Skip to content

Commit 280fa8f

Browse files
author
César Román
authored
refactor: use correct typing notation for args and kwargs (#97)
1 parent 678a9b5 commit 280fa8f

File tree

26 files changed

+78
-78
lines changed

26 files changed

+78
-78
lines changed

src/com/inductiveautomation/factorypmi/application/script/builtin/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def swapTo(self, name, params):
6767
raise NotImplementedError
6868

6969
def swapWindow(self, *args):
70-
# type: (Any) -> PyObject
70+
# type: (*Any) -> PyObject
7171
raise NotImplementedError
7272

7373

@@ -117,7 +117,7 @@ def swapTo(self, name, params):
117117
pass
118118

119119
def swapWindow(self, *args):
120-
# type: (Any) -> PyObject
120+
# type: (*Any) -> PyObject
121121
pass
122122

123123

src/com/inductiveautomation/ignition/common/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def setDirty(self):
343343

344344
class BasicDataset(AbstractDataset):
345345
def __init__(self, *args):
346-
# type: (Any) -> None
346+
# type: (*Any) -> None
347347
print(args)
348348
super(BasicDataset, self).__init__([""], [Class()])
349349

src/com/inductiveautomation/ignition/common/alarming/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def iterator(self):
7474

7575
class EventData(BasicPropertySet):
7676
def __init__(self, *args):
77-
# type: (Any) -> None
77+
# type: (*Any) -> None
7878
super(EventData, self).__init__(*args)
7979

8080
def getTimeStamp(self):

src/com/inductiveautomation/ignition/common/alarming/evaluation/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ShelvedPath(Object):
5757
"""
5858

5959
def __init__(self, *args):
60-
# type: (Any) -> None
60+
# type: (*Any) -> None
6161
print(args)
6262

6363
def getExpiration(self):

src/com/inductiveautomation/ignition/common/alarming/query/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def getEvent(self, uuid):
2626

2727
class AlarmQueryResultImpl(AlarmQueryResult):
2828
def __init__(self, *args):
29-
# type: (Any) -> None
29+
# type: (*Any) -> None
3030
pass
3131

3232
def __iter__(self):

src/com/inductiveautomation/ignition/common/browsing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Results(Object):
3838
totalAvailableResults = None # type: int
3939

4040
def __init__(self, *args):
41-
# type: (Any) -> None
41+
# type: (*Any) -> None
4242
print(args)
4343
self.continuationPoint = None
4444
self.resultQuality = QualityCode.Good

src/com/inductiveautomation/ignition/common/config/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class BasicProperty(Property, Object):
5858
_hcode = None # type: int
5959

6060
def __init__(self, *args):
61-
# type: (Any) -> None
61+
# type: (*Any) -> None
6262
if not args:
6363
self._hcode = 0
6464
elif len(args) == 2:
@@ -114,11 +114,11 @@ def setName_(self, name):
114114

115115
class BasicPropertySet(Object):
116116
def __init__(self, *args):
117-
# type: (Any) -> None
117+
# type: (*Any) -> None
118118
pass
119119

120120
def addPropertySet(self, *args):
121-
# type: (Any) -> None
121+
# type: (*Any) -> None
122122
pass
123123

124124
def contains(self, prop):
@@ -171,7 +171,7 @@ def iterator(self):
171171

172172
@staticmethod
173173
def of(*args):
174-
# type: (PropertyValue) -> PropertySet
174+
# type: (*PropertyValue) -> PropertySet
175175
pass
176176

177177
def remove(self, prop):
@@ -206,7 +206,7 @@ def set(self, prop, value):
206206

207207
class PropertyValue(Object):
208208
def __init__(self, *args):
209-
# type: (Any) -> None
209+
# type: (*Any) -> None
210210
pass
211211

212212
def getProperty(self):

src/com/inductiveautomation/ignition/common/gson/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def create(self, gson, token):
3434

3535
class FieldAttributes(Object):
3636
def __init__(self, *args):
37-
# type: (Any) -> None
37+
# type: (*Any) -> None
3838
pass
3939

4040
def getAnnotation(self, annotation):
@@ -93,7 +93,7 @@ def fieldNamingStrategy(self):
9393
pass
9494

9595
def fromJson(self, *args):
96-
# type: (Any) -> T
96+
# type: (*Any) -> T
9797
pass
9898

9999
def getAdapter(self, TypeToken=None):
@@ -125,7 +125,7 @@ def serializeNulls(self):
125125
pass
126126

127127
def toJson(self, *args):
128-
# type: (Any) -> Optional[String]
128+
# type: (*Any) -> Optional[String]
129129
pass
130130

131131
def toJsonTree(self, src, typeOfSrc=None):
@@ -135,7 +135,7 @@ def toJsonTree(self, src, typeOfSrc=None):
135135

136136
class GsonBuilder(object):
137137
def __init__(self, *args):
138-
# type: (Any) -> None
138+
# type: (*Any) -> None
139139
pass
140140

141141
def addDeserializationExclusionStrategy(self, strategy):
@@ -167,7 +167,7 @@ def excludeFieldsWithoutExposeAnnotation(self):
167167
pass
168168

169169
def excludeFieldsWithModifiers(self, *args):
170-
# type: (int) -> GsonBuilder
170+
# type: (*int) -> GsonBuilder
171171
pass
172172

173173
def generateNonExecutableJson(self):
@@ -199,11 +199,11 @@ def serializeSpecialFloatingPointValues(self):
199199
pass
200200

201201
def setDateFormat(self, *args):
202-
# type: (Any) -> GsonBuilder
202+
# type: (*Any) -> GsonBuilder
203203
pass
204204

205205
def setExclusionStrategies(self, *args):
206-
# type: (ExclusionStrategy) -> GsonBuilder
206+
# type: (*ExclusionStrategy) -> GsonBuilder
207207
pass
208208

209209
def setFieldNamingPolicy(self, namingConvention):

src/com/inductiveautomation/ignition/common/i18n/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def parseLocale(locale):
2020

2121
class LocalizedString(Object):
2222
def __init__(self, *args):
23-
# type: (Any) -> None
23+
# type: (*Any) -> None
2424
pass
2525

2626
def compareTo(self, other):

src/com/inductiveautomation/ignition/common/messages/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def attempt(self, method):
3939
pass
4040

4141
def error(self, message, *args):
42-
# type: (String, Object) -> None
42+
# type: (String, *Object) -> None
4343
pass
4444

4545
def getErrors(self):
@@ -59,11 +59,11 @@ def getWarns(self):
5959
pass
6060

6161
def info(self, message, *args):
62-
# type: (String, Object) -> None
62+
# type: (String, *Object) -> None
6363
pass
6464

6565
def warn(self, message, *args):
66-
# type: (String, Object) -> None
66+
# type: (String, *Object) -> None
6767
pass
6868

6969
@staticmethod

0 commit comments

Comments
 (0)