Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ per-file-ignores =
# F811 redefinition of unused '...'
stdlib/typing.pyi: B, E701, E741, F401, F403, F405, F811
# Generated protobuf files include docstrings
# *_pb2.pyi: B, E701, E741, F401, F403, F405, Y021, Y026, Y053, Y054
*_pb2.pyi: B, E701, E741, F401, F403, F405, Y021, Y026, Y053, Y054

# TODO: Re-enable Flake8 on generated protobuf files
# after https://github.com/nipunn1313/mypy-protobuf/issues/523 is resolved
exclude = .venv*,.git,*_pb2.pyi
exclude = .venv*,.git
noqa_require_code = true
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ line-length = 130
target-version = "py37"
fix = true
exclude = [
# Ignore generated protobuf stubs
"*_pb2.pyi",
# virtual environment
".env",
".venv",
Expand Down
4 changes: 2 additions & 2 deletions stubs/s2clientprotocol/s2clientprotocol/data_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class AbilityData(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TargetEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[AbilityData._Target.ValueType], builtins.type): # noqa: F821
class _TargetEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[AbilityData._Target.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Point: AbilityData._Target.ValueType # 2
"""Requires a target position."""
Expand Down Expand Up @@ -183,7 +183,7 @@ class Weapon(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TargetTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Weapon._TargetType.ValueType], builtins.type): # noqa: F821
class _TargetTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Weapon._TargetType.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Ground: Weapon._TargetType.ValueType # 1
Air: Weapon._TargetType.ValueType # 2
Expand Down
6 changes: 3 additions & 3 deletions stubs/s2clientprotocol/s2clientprotocol/debug_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class DebugTestProcess(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TestEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugTestProcess._Test.ValueType], builtins.type): # noqa: F821
class _TestEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugTestProcess._Test.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
hang: DebugTestProcess._Test.ValueType # 1
crash: DebugTestProcess._Test.ValueType # 2
Expand Down Expand Up @@ -387,7 +387,7 @@ class DebugEndGame(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _EndResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugEndGame._EndResult.ValueType], builtins.type): # noqa: F821
class _EndResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugEndGame._EndResult.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Surrender: DebugEndGame._EndResult.ValueType # 1
"""Default if nothing is set. The current player admits defeat."""
Expand Down Expand Up @@ -418,7 +418,7 @@ class DebugSetUnitValue(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _UnitValueEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugSetUnitValue._UnitValue.ValueType], builtins.type): # noqa: F821
class _UnitValueEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugSetUnitValue._UnitValue.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Energy: DebugSetUnitValue._UnitValue.ValueType # 1
Life: DebugSetUnitValue._UnitValue.ValueType # 2
Expand Down
16 changes: 8 additions & 8 deletions stubs/s2clientprotocol/s2clientprotocol/sc2api_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class ResponseCreateGame(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseCreateGame._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseCreateGame._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
MissingMap: ResponseCreateGame._Error.ValueType # 1
InvalidMapPath: ResponseCreateGame._Error.ValueType # 2
Expand Down Expand Up @@ -664,7 +664,7 @@ class ResponseJoinGame(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseJoinGame._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseJoinGame._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
MissingParticipation: ResponseJoinGame._Error.ValueType # 1
InvalidObservedPlayerId: ResponseJoinGame._Error.ValueType # 2
Expand Down Expand Up @@ -741,7 +741,7 @@ class ResponseRestartGame(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseRestartGame._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseRestartGame._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
LaunchError: ResponseRestartGame._Error.ValueType # 1

Expand Down Expand Up @@ -818,7 +818,7 @@ class ResponseStartReplay(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseStartReplay._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseStartReplay._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
MissingReplay: ResponseStartReplay._Error.ValueType # 1
InvalidReplayPath: ResponseStartReplay._Error.ValueType # 2
Expand Down Expand Up @@ -878,7 +878,7 @@ class ResponseMapCommand(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseMapCommand._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseMapCommand._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
NoTriggerError: ResponseMapCommand._Error.ValueType # 1

Expand Down Expand Up @@ -1371,7 +1371,7 @@ class ResponseReplayInfo(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseReplayInfo._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseReplayInfo._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
MissingReplay: ResponseReplayInfo._Error.ValueType # 1
InvalidReplayPath: ResponseReplayInfo._Error.ValueType # 2
Expand Down Expand Up @@ -1501,7 +1501,7 @@ class ResponseSaveMap(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseSaveMap._Error.ValueType], builtins.type): # noqa: F821
class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseSaveMap._Error.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
InvalidMapData: ResponseSaveMap._Error.ValueType # 1

Expand Down Expand Up @@ -1897,7 +1897,7 @@ class ActionChat(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ChannelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionChat._Channel.ValueType], builtins.type): # noqa: F821
class _ChannelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionChat._Channel.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Broadcast: ActionChat._Channel.ValueType # 1
Team: ActionChat._Channel.ValueType # 2
Expand Down
2 changes: 1 addition & 1 deletion stubs/s2clientprotocol/s2clientprotocol/score_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Score(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ScoreTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Score._ScoreType.ValueType], builtins.type): # noqa: F821
class _ScoreTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Score._ScoreType.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Curriculum: Score._ScoreType.ValueType # 1
"""map generated score (from curriculum maps with special scoring)"""
Expand Down
2 changes: 1 addition & 1 deletion stubs/s2clientprotocol/s2clientprotocol/spatial_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class ActionSpatialUnitSelectionPoint(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSpatialUnitSelectionPoint._Type.ValueType], builtins.type): # noqa: F821
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSpatialUnitSelectionPoint._Type.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Select: ActionSpatialUnitSelectionPoint._Type.ValueType # 1
"""Equivalent to normal click. Changes selection to unit."""
Expand Down
6 changes: 3 additions & 3 deletions stubs/s2clientprotocol/s2clientprotocol/ui_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class ActionControlGroup(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _ControlGroupActionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionControlGroup._ControlGroupAction.ValueType], builtins.type): # noqa: F821
class _ControlGroupActionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionControlGroup._ControlGroupAction.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Recall: ActionControlGroup._ControlGroupAction.ValueType # 1
"""Equivalent to number hotkey. Replaces current selection with control group."""
Expand Down Expand Up @@ -397,7 +397,7 @@ class ActionSelectIdleWorker(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSelectIdleWorker._Type.ValueType], builtins.type): # noqa: F821
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSelectIdleWorker._Type.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
Set: ActionSelectIdleWorker._Type.ValueType # 1
"""Equivalent to click with no modifiers. Replaces selection with single idle worker."""
Expand Down Expand Up @@ -438,7 +438,7 @@ class ActionMultiPanel(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionMultiPanel._Type.ValueType], builtins.type): # noqa: F821
class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionMultiPanel._Type.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
SingleSelect: ActionMultiPanel._Type.ValueType # 1
"""Click on icon"""
Expand Down