Skip to content

Commit f7dc3b4

Browse files
authored
Merge branch 'master' into develop-0.1.0
2 parents d224d8e + 08870f7 commit f7dc3b4

20 files changed

+12839
-1
lines changed

.no-sublime-package

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

DEPENDENCES_LICENSE.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# libraries licenses
2+
3+
Licenses for my dependencies, I have copy pasted them from your github repositories, if you see anything wrong please contact me!
4+
5+
## pyparsing
6+
7+
```
8+
# Copyright (c) 2003-2019 Paul T. McGuire
9+
#
10+
# Permission is hereby granted, free of charge, to any person obtaining
11+
# a copy of this software and associated documentation files (the
12+
# "Software"), to deal in the Software without restriction, including
13+
# without limitation the rights to use, copy, modify, merge, publish,
14+
# distribute, sublicense, and/or sell copies of the Software, and to
15+
# permit persons to whom the Software is furnished to do so, subject to
16+
# the following conditions:
17+
#
18+
# The above copyright notice and this permission notice shall be
19+
# included in all copies or substantial portions of the Software.
20+
#
21+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
#
29+
```
30+
31+
## asttokens
32+
33+
```
34+
# Copyright 2016 Grist Labs, Inc.
35+
#
36+
# Licensed under the Apache License, Version 2.0 (the "License");
37+
# you may not use this file except in compliance with the License.
38+
# You may obtain a copy of the License at
39+
#
40+
# http://www.apache.org/licenses/LICENSE-2.0
41+
#
42+
# Unless required by applicable law or agreed to in writing, software
43+
# distributed under the License is distributed on an "AS IS" BASIS,
44+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45+
# See the License for the specific language governing permissions and
46+
# limitations under the License.
47+
```
48+
49+
## astmonkey
50+
51+
```
52+
Copyright [2013] [Konrad Hałas]
53+
54+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
55+
56+
http://www.apache.org/licenses/LICENSE-2.0
57+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
58+
```
59+
60+
## six
61+
62+
```
63+
Copyright (c) 2010-2019 Benjamin Peterson
64+
65+
Permission is hereby granted, free of charge, to any person obtaining a copy of
66+
this software and associated documentation files (the "Software"), to deal in
67+
the Software without restriction, including without limitation the rights to
68+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
69+
the Software, and to permit persons to whom the Software is furnished to do so,
70+
subject to the following conditions:
71+
72+
The above copyright notice and this permission notice shall be included in all
73+
copies or substantial portions of the Software.
74+
75+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
77+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
78+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
79+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
80+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
81+
```
82+
83+
## segment_tree
84+
85+
```
86+
MIT License
87+
88+
Copyright (c) 2017 Evgeny Yurtaev
89+
90+
Permission is hereby granted, free of charge, to any person obtaining a copy
91+
of this software and associated documentation files (the "Software"), to deal
92+
in the Software without restriction, including without limitation the rights
93+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
94+
copies of the Software, and to permit persons to whom the Software is
95+
furnished to do so, subject to the following conditions:
96+
97+
The above copyright notice and this permission notice shall be included in all
98+
copies or substantial portions of the Software.
99+
100+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
101+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
102+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
103+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
104+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
105+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
106+
SOFTWARE.
107+
```
108+
109+
## pydot
110+
111+
```
112+
Copyright (c) 2014 Carlos Jenkins
113+
Copyright (c) 2014 Lance Helper
114+
Copyright (c) 2004 Ero Carrera
115+
116+
Permission is hereby granted, free of charge, to any person obtaining a copy
117+
of this software and associated documentation files (the "Software"), to deal
118+
in the Software without restriction, including without limitation the rights
119+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
120+
copies of the Software, and to permit persons to whom the Software is
121+
furnished to do so, subject to the following conditions:
122+
123+
The above copyright notice and this permission notice shall be included in all
124+
copies or substantial portions of the Software.
125+
126+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
127+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
128+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
129+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
130+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
131+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
132+
SOFTWARE.
133+
```

bundles/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,27 @@ To install them simply copy paste the script insise caster "apps" folder:)
88

99
once again thanks to @LexiconCode there are bundles for the upcoming Caster 1.0.0 but installation is a bit different(to be updated)
1010

11+
For use within Linux see also the Aenea folder
12+
13+
## Update
14+
15+
Also you should know that Caster 1.x.x is also supported but you must enable it by saying
16+
17+
```
18+
enable python voice coding plugin
19+
```
20+
21+
also the datum needs to be stored in a different folder. Up until recently these used to be
22+
23+
```
24+
C:\Users\%USERNAME%\.caster\rules
25+
```
26+
27+
but the latest masterhas moved to this folder to
28+
29+
```
30+
C:\Users\%USERNAME%\AppData\Local\caster\rules
31+
```
32+
33+
https://github.com/dictation-toolbox/Caster/pull/718
34+

third_party/.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*
1+
*.dist-info
2+
__pycache__
3+

third_party/astmonkey/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.3.6'

third_party/astmonkey/transformers.py

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import ast
2+
3+
4+
class ParentChildNodeTransformer(object):
5+
6+
def visit(self, node):
7+
self._prepare_node(node)
8+
for field, value in ast.iter_fields(node):
9+
self._process_field(node, field, value)
10+
return node
11+
12+
@staticmethod
13+
def _prepare_node(node):
14+
if not hasattr(node, 'parent'):
15+
node.parent = None
16+
if not hasattr(node, 'parents'):
17+
node.parents = []
18+
if not hasattr(node, 'children'):
19+
node.children = []
20+
21+
def _process_field(self, node, field, value):
22+
if isinstance(value, list):
23+
for index, item in enumerate(value):
24+
if isinstance(item, ast.AST):
25+
self._process_child(item, node, field, index)
26+
elif isinstance(value, ast.AST):
27+
self._process_child(value, node, field)
28+
29+
def _process_child(self, child, parent, field_name, index=None):
30+
self.visit(child)
31+
child.parent = parent
32+
child.parents.append(parent)
33+
child.parent_field = field_name
34+
child.parent_field_index = index
35+
child.parent.children.append(child)

third_party/astmonkey/utils.py

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import ast
2+
import sys
3+
4+
5+
def is_docstring(node):
6+
if node.parent is None or node.parent.parent is None:
7+
return False
8+
def_node = node.parent.parent
9+
return (
10+
isinstance(def_node, (ast.FunctionDef, ast.ClassDef, ast.Module)) and def_node.body and
11+
isinstance(def_node.body[0], ast.Expr) and isinstance(def_node.body[0].value, ast.Str) and
12+
def_node.body[0].value == node
13+
)
14+
15+
16+
def get_by_python_version(classes, python_version=sys.version_info):
17+
result = None
18+
for cls in classes:
19+
if cls.__python_version__ <= python_version:
20+
if not result or cls.__python_version__ > result.__python_version__:
21+
result = cls
22+
if not result:
23+
raise NotImplementedError('astmonkey does not support Python %s.' % sys.version)
24+
return result
25+
26+
27+
class CommaWriter:
28+
29+
def __init__(self, write_func, add_space_at_beginning=False):
30+
self.write_func = write_func
31+
self.add_space_at_beginning = add_space_at_beginning
32+
self.not_called_yet = True
33+
34+
def __call__(self, *args, **kwargs):
35+
if self.not_called_yet:
36+
self.not_called_yet = False
37+
if self.add_space_at_beginning:
38+
self.write_func(' ')
39+
else:
40+
self.write_func(', ')
41+
42+
def check_version(from_inclusive=None, to_exclusive=None):
43+
if (not from_inclusive or sys.version_info >= from_inclusive) \
44+
and (not to_exclusive or sys.version_info < to_exclusive):
45+
return True
46+
return False

0 commit comments

Comments
 (0)