-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from lonvia/enable-mypy-checks
Fix all warnings from mypy and flake8
- Loading branch information
Showing
47 changed files
with
245 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include src/nominatim_data_analyser/rules_specifications/*.yaml | ||
include src/nominatim_data_analyser/config/default.yaml | ||
include src/nominatim_data_analyser/py.typed | ||
recursive-include contrib * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
from .core.core import Core | ||
import argparse | ||
|
||
def cli(): | ||
def cli() -> int: | ||
parser = argparse.ArgumentParser(prog='nominatim-analyser') | ||
|
||
parser.add_argument('--execute-all', action='store_true', help='Executes all the QA rules') | ||
parser.add_argument('--filter', metavar='<QA rules names>', nargs='+', help='Filters some QA rules so they are not executed.') | ||
parser.add_argument('--execute-one', metavar='<QA rule name>', action='store', type=str, help='Executes the given QA rule') | ||
parser.add_argument('--execute-all', action='store_true', | ||
help='Executes all the QA rules') | ||
parser.add_argument('--filter', metavar='<QA rules names>', nargs='+', | ||
help='Filters some QA rules so they are not executed.') | ||
parser.add_argument('--execute-one', metavar='<QA rule name>', action='store', | ||
type=str, help='Executes the given QA rule') | ||
|
||
args = parser.parse_args() | ||
|
||
#Executes all the QA rules. If a filter is given, these rules are excluded from the execution. | ||
# Executes all the QA rules. If a filter is given, these rules are excluded from the execution. | ||
if args.execute_all: | ||
if args.filter: | ||
Core().execute_all(args.filter) | ||
else: | ||
Core().execute_all() | ||
elif args.execute_one: | ||
#Execute the given QA rule. | ||
# Execute the given QA rule. | ||
Core().execute_one(args.execute_one) | ||
|
||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .config import Config | ||
from .config import Config as Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
""" | ||
Core module of the analyser | ||
""" | ||
from .pipe import Pipe | ||
from .pipe import Pipe as Pipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 9 additions & 12 deletions
21
src/nominatim_data_analyser/core/assembler/pipeline_assembler.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .dynamic_value import DynamicValue | ||
from .switch import Switch | ||
from .variable import Variable | ||
from .resolver import resolve_all, resolve_one | ||
from .dynamic_value import DynamicValue as DynamicValue | ||
from .switch import Switch as Switch | ||
from .variable import Variable as Variable | ||
from .resolver import (resolve_all as resolve_all, | ||
resolve_one as resolve_one) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.