mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
CI: add type checking (#10997)
* Set up type checking with mypy. * Make mypy pass. * Use list() instead of sorted().
This commit is contained in:
@@ -166,10 +166,11 @@ def main():
|
||||
|
||||
|
||||
class Crypttab(object):
|
||||
_lines = []
|
||||
_lines: list[str]
|
||||
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
self._lines = []
|
||||
if not os.path.exists(path):
|
||||
if not os.path.exists(os.path.dirname(path)):
|
||||
os.makedirs(os.path.dirname(path))
|
||||
|
||||
Reference in New Issue
Block a user