Skip to content

Commit e7ee8cc

Browse files
committed
typing: fix missing override decorators
1 parent 0321d0d commit e7ee8cc

File tree

9 files changed

+13
-1
lines changed

9 files changed

+13
-1
lines changed

pyinfra/connectors/docker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def __init__(self, state: "State", host: "Host"):
104104
super().__init__(state, host)
105105
self.local = LocalConnector(state, host)
106106

107+
@override
107108
@staticmethod
108109
def make_names_data(name=None):
109110
if not name:

pyinfra/connectors/dockerssh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __init__(self, state: "State", host: "Host"):
5050
super().__init__(state, host)
5151
self.ssh = SSHConnector(state, host)
5252

53+
@override
5354
@staticmethod
5455
def make_names_data(name):
5556
try:

pyinfra/connectors/local.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class LocalConnector(BaseConnector):
3838

3939
handles_execution = True
4040

41+
@override
4142
@staticmethod
4243
def make_names_data(name=None):
4344
if name is not None:

pyinfra/connectors/ssh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class SSHConnector(BaseConnector):
144144

145145
client: Optional[SSHClient] = None
146146

147+
@override
147148
@staticmethod
148149
def make_names_data(name):
149150
yield "@ssh/{0}".format(name), {"ssh_hostname": name}, []

pyinfra/connectors/terraform.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import json
22

3+
from typing_extensions import override
4+
35
from pyinfra import local, logger
46
from pyinfra.api.exceptions import InventoryError
57
from pyinfra.api.util import memoize
@@ -76,6 +78,7 @@ class TerraformInventoryConnector(BaseConnector):
7678
7779
"""
7880

81+
@override
7982
@staticmethod
8083
def make_names_data(name=None):
8184
show_warning()

pyinfra/connectors/vagrant.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from queue import Queue
44
from threading import Thread
55

6+
from typing_extensions import override
7+
68
from pyinfra import local, logger
79
from pyinfra.api.exceptions import InventoryError
810
from pyinfra.api.util import memoize
@@ -131,6 +133,7 @@ class VagrantInventoryConnector(BaseConnector):
131133
pyinfra @vagrant/my-vm-name,@vagrant/another-vm-name ...
132134
"""
133135

136+
@override
134137
@staticmethod
135138
def make_names_data(name=None):
136139
vagrant_ssh_info = get_vagrant_config(name)

pyinfra/facts/brew.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def command(self) -> str:
4747
def requires_command(self) -> str:
4848
return "brew"
4949

50+
@override
5051
@staticmethod
5152
def default():
5253
return [0, 0, 0]

pyinfra/facts/hardware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def process(self, output):
4646
value, key = line.split(" ", 1)
4747

4848
try:
49-
value = int(value)
49+
value = float(value)
5050
except ValueError:
5151
continue
5252

pyinfra/facts/opkg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class OpkgConf(FactBase):
8181
re.X,
8282
)
8383

84+
@override
8485
@staticmethod
8586
def default():
8687
return OpkgConfInfo({}, "", {}, {})

0 commit comments

Comments
 (0)