Skip to content

Commit

Permalink
[lint] resolve warnings
Browse files Browse the repository at this point in the history
apalala committed Nov 28, 2023
1 parent 2d9fc14 commit ff4c5dd
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tatsu/util/_common.py
Original file line number Diff line number Diff line change
@@ -57,6 +57,13 @@ def _pubdict(self):
}


def program_name():
import __main__ as main
if package := main.__package__:
return package
return Path(main.__file__).name


def is_posix():
return os.name == 'posix'

3 changes: 1 addition & 2 deletions tatsu/util/parproc.py
Original file line number Diff line number Diff line change
@@ -15,13 +15,12 @@
TimeRemainingColumn,
)


from tatsu.util.unicode_characters import (
U_CHECK_MARK,
U_CROSSED_SWORDS,
)

from .util import identity, memory_use, program_name, try_read
from ..util import identity, memory_use, program_name, try_read

__all__ = ['parallel_proc', 'processing_loop']

2 changes: 2 additions & 0 deletions tatsu/walkers.py
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ def _walk_children(self, node: Node, *args, **kwargs):
for child in node.children():
return self.walk(child, *args, **kwargs)

return None

def _find_walker(self, node: Node, prefix='walk_'):
def pythonize_match(m):
return '_' + m.group().lower()

0 comments on commit ff4c5dd

Please sign in to comment.