├── .gitattributes ├── .mypy_cache └── 3.7 │ ├── @plugins_snapshot.json │ ├── _ast.data.json │ ├── _ast.meta.json │ ├── _csv.data.json │ ├── _csv.meta.json │ ├── _importlib_modulespec.data.json │ ├── _importlib_modulespec.meta.json │ ├── _random.data.json │ ├── _random.meta.json │ ├── abc.data.json │ ├── abc.meta.json │ ├── access_db_iterator.data.json │ ├── access_db_iterator.meta.json │ ├── as_complete_method_use.data.json │ ├── as_complete_method_use.meta.json │ ├── ast.data.json │ ├── ast.meta.json │ ├── async_comprehension.data.json │ ├── async_comprehension.meta.json │ ├── async_generator.data.json │ ├── async_generator.meta.json │ ├── async_hello.data.json │ ├── async_hello.meta.json │ ├── async_timeout_use.data.json │ ├── async_timeout_use.meta.json │ ├── asyncio │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── coroutines.data.json │ ├── coroutines.meta.json │ ├── events.data.json │ ├── events.meta.json │ ├── futures.data.json │ ├── futures.meta.json │ ├── locks.data.json │ ├── locks.meta.json │ ├── protocols.data.json │ ├── protocols.meta.json │ ├── queues.data.json │ ├── queues.meta.json │ ├── runners.data.json │ ├── runners.meta.json │ ├── streams.data.json │ ├── streams.meta.json │ ├── subprocess.data.json │ ├── subprocess.meta.json │ ├── tasks.data.json │ ├── tasks.meta.json │ ├── transports.data.json │ └── transports.meta.json │ ├── builtins.data.json │ ├── builtins.meta.json │ ├── cache_using_call.data.json │ ├── cache_using_call.meta.json │ ├── codecs.data.json │ ├── codecs.meta.json │ ├── collections │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── abc.data.json │ └── abc.meta.json │ ├── concurrent │ ├── __init__.data.json │ ├── __init__.meta.json │ └── futures │ │ ├── __init__.data.json │ │ ├── __init__.meta.json │ │ ├── _base.data.json │ │ ├── _base.meta.json │ │ ├── process.data.json │ │ ├── process.meta.json │ │ ├── thread.data.json │ │ └── thread.meta.json │ ├── concurrent_run_tasks.data.json │ ├── concurrent_run_tasks.meta.json │ ├── configparser.data.json │ ├── configparser.meta.json │ ├── context_with_file_read.data.json │ ├── context_with_file_read.meta.json │ ├── contextlib.data.json │ ├── contextlib.meta.json │ ├── counter.data.json │ ├── counter.meta.json │ ├── csv.data.json │ ├── csv.meta.json │ ├── datetime.data.json │ ├── datetime.meta.json │ ├── decorator_example.data.json │ ├── decorator_example.meta.json │ ├── decorator_example_2.data.json │ ├── decorator_example_2.meta.json │ ├── decorators_with_arguments.data.json │ ├── decorators_with_arguments.meta.json │ ├── define_context_manager.data.json │ ├── define_context_manager.meta.json │ ├── deque.data.json │ ├── deque.meta.json │ ├── dont_return_none.data.json │ ├── dont_return_none.meta.json │ ├── else_in_for_loop_with_break.data.json │ ├── else_in_for_loop_with_break.meta.json │ ├── else_with_for_loop.data.json │ ├── else_with_for_loop.meta.json │ ├── enum.data.json │ ├── enum.meta.json │ ├── exception_instead_of_return.data.json │ ├── exception_instead_of_return.meta.json │ ├── function_docstring.data.json │ ├── function_docstring.meta.json │ ├── functool_for_decorator.data.json │ ├── functool_for_decorator.meta.json │ ├── functools.data.json │ ├── functools.meta.json │ ├── gather_to_run_concurrently.data.json │ ├── gather_to_run_concurrently.meta.json │ ├── generator_example.data.json │ ├── generator_example.meta.json │ ├── handle_specific_exception.data.json │ ├── handle_specific_exception.meta.json │ ├── hypothesis_use_for_property_testing.data.json │ ├── hypothesis_use_for_property_testing.meta.json │ ├── importlib │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── abc.data.json │ ├── abc.meta.json │ ├── machinery.data.json │ ├── machinery.meta.json │ ├── util.data.json │ └── util.meta.json │ ├── io.data.json │ ├── io.meta.json │ ├── iterating_task_using_gather.data.json │ ├── iterating_task_using_gather.meta.json │ ├── json │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── decoder.data.json │ ├── decoder.meta.json │ ├── encoder.data.json │ └── encoder.meta.json │ ├── lambda_use_to_find_min.data.json │ ├── lambda_use_to_find_min.meta.json │ ├── list_as_prime_number.data.json │ ├── list_as_prime_number.meta.json │ ├── lock_file_reading.data.json │ ├── lock_file_reading.meta.json │ ├── logging │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── config.data.json │ └── config.meta.json │ ├── logging_decorator.data.json │ ├── logging_decorator.meta.json │ ├── logging_use.data.json │ ├── logging_use.meta.json │ ├── merge_two_dict.data.json │ ├── merge_two_dict.meta.json │ ├── mmap.data.json │ ├── mmap.meta.json │ ├── module_level_docstring.data.json │ ├── module_level_docstring.meta.json │ ├── most_count.data.json │ ├── most_count.meta.json │ ├── multi_docstring.data.json │ ├── multi_docstring.meta.json │ ├── multi_docstring_with_typing.data.json │ ├── multi_docstring_with_typing.meta.json │ ├── multi_line_class_docstring.data.json │ ├── multi_line_class_docstring.meta.json │ ├── multiple_decorators.data.json │ ├── multiple_decorators.meta.json │ ├── multiple_task_to_run_using_curio_run.data.json │ ├── multiple_task_to_run_using_curio_run.meta.json │ ├── namedtuple.data.json │ ├── namedtuple.meta.json │ ├── namedtuple_example.data.json │ ├── namedtuple_example.meta.json │ ├── os │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── path.data.json │ └── path.meta.json │ ├── pathlib.data.json │ ├── pathlib.meta.json │ ├── pathlib_example.data.json │ ├── pathlib_example.meta.json │ ├── posix.data.json │ ├── posix.meta.json │ ├── pprint.data.json │ ├── pprint.meta.json │ ├── private_variable.data.json │ ├── private_variable.meta.json │ ├── pytest_example.data.json │ ├── pytest_example.meta.json │ ├── pytest_with_fixture.data.json │ ├── pytest_with_fixture.meta.json │ ├── raise_exception_python.data.json │ ├── raise_exception_python.meta.json │ ├── raising_exception_instead_of_none.data.json │ ├── raising_exception_instead_of_none.meta.json │ ├── random.data.json │ ├── random.meta.json │ ├── re.data.json │ ├── re.meta.json │ ├── read_csv_cleaner.data.json │ ├── read_csv_cleaner.meta.json │ ├── read_csv_file_using_list.data.json │ ├── read_csv_file_using_list.meta.json │ ├── read_csv_non_cleaner.data.json │ ├── read_csv_non_cleaner.meta.json │ ├── read_file_geneator.data.json │ ├── read_file_geneator.meta.json │ ├── read_unique_email.data.json │ ├── read_unique_email.meta.json │ ├── return_non_none_explicitly.data.json │ ├── return_non_none_explicitly.meta.json │ ├── return_none_explicitly.data.json │ ├── return_none_explicitly.meta.json │ ├── return_none_explicitly_bad_code.data.json │ ├── return_none_explicitly_bad_code.meta.json │ ├── return_none_explicitly_one_more_way.data.json │ ├── return_none_explicitly_one_more_way.meta.json │ ├── run_simple_task.data.json │ ├── run_simple_task.meta.json │ ├── run_two_tasks.data.json │ ├── run_two_tasks.meta.json │ ├── scheduling_tasks.data.json │ ├── scheduling_tasks.meta.json │ ├── selectors.data.json │ ├── selectors.meta.json │ ├── set_get_using_property.data.json │ ├── set_get_using_property.meta.json │ ├── simple_curio.data.json │ ├── simple_curio.meta.json │ ├── simple_namedtuple.data.json │ ├── simple_namedtuple.meta.json │ ├── single_level_docstring.data.json │ ├── single_level_docstring.meta.json │ ├── small_function.data.json │ ├── small_function.meta.json │ ├── socket.data.json │ ├── socket.meta.json │ ├── sort_dictionary.data.json │ ├── sort_dictionary.meta.json │ ├── sqlite3 │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── dbapi2.data.json │ └── dbapi2.meta.json │ ├── ssl.data.json │ ├── ssl.meta.json │ ├── stacktrace_logging.data.json │ ├── stacktrace_logging.meta.json │ ├── store_db_result_in_list.data.json │ ├── store_db_result_in_list.meta.json │ ├── string.data.json │ ├── string.meta.json │ ├── sys.data.json │ ├── sys.meta.json │ ├── testing_exception.data.json │ ├── testing_exception.meta.json │ ├── threading.data.json │ ├── threading.meta.json │ ├── time.data.json │ ├── time.meta.json │ ├── trio_concurrent_tasks.data.json │ ├── trio_concurrent_tasks.meta.json │ ├── trio_simple.data.json │ ├── trio_simple.meta.json │ ├── types.data.json │ ├── types.meta.json │ ├── typing.data.json │ ├── typing.meta.json │ ├── typing_extensions.data.json │ ├── typing_extensions.meta.json │ ├── typing_simple_example.data.json │ ├── typing_simple_example.meta.json │ ├── unittest │ ├── __init__.data.json │ └── __init__.meta.json │ ├── unittest_example.data.json │ ├── unittest_example.meta.json │ ├── use_await.data.json │ ├── use_await.meta.json │ ├── use_decorator_lib.data.json │ ├── use_decorator_lib.meta.json │ ├── use_default_arg.data.json │ ├── use_default_arg.meta.json │ ├── use_get_as_descripter.data.json │ ├── use_get_as_descripter.meta.json │ ├── use_join.data.json │ ├── use_join.meta.json │ ├── use_lock.data.json │ ├── use_lock.meta.json │ ├── use_logging_conf.data.json │ ├── use_logging_conf.meta.json │ ├── use_new_for_validation.data.json │ ├── use_new_for_validation.meta.json │ ├── use_property.data.json │ ├── use_property.meta.json │ ├── use_zip_for_list.data.json │ ├── use_zip_for_list.meta.json │ ├── use_zip_to_process_lists.data.json │ ├── use_zip_to_process_lists.meta.json │ ├── using_func_as_parameter.data.json │ ├── using_func_as_parameter.meta.json │ ├── using_list_to_combine_list.data.json │ ├── using_list_to_combine_list.meta.json │ ├── with_static_use.data.json │ ├── with_static_use.meta.json │ ├── without_context_manager_read_file.data.json │ ├── without_context_manager_read_file.meta.json │ ├── without_static.data.json │ ├── without_static.meta.json │ ├── yaml │ ├── __init__.data.json │ ├── __init__.meta.json │ ├── composer.data.json │ ├── composer.meta.json │ ├── constructor.data.json │ ├── constructor.meta.json │ ├── cyaml.data.json │ ├── cyaml.meta.json │ ├── dumper.data.json │ ├── dumper.meta.json │ ├── emitter.data.json │ ├── emitter.meta.json │ ├── error.data.json │ ├── error.meta.json │ ├── events.data.json │ ├── events.meta.json │ ├── loader.data.json │ ├── loader.meta.json │ ├── nodes.data.json │ ├── nodes.meta.json │ ├── parser.data.json │ ├── parser.meta.json │ ├── reader.data.json │ ├── reader.meta.json │ ├── representer.data.json │ ├── representer.meta.json │ ├── resolver.data.json │ ├── resolver.meta.json │ ├── scanner.data.json │ ├── scanner.meta.json │ ├── serializer.data.json │ ├── serializer.meta.json │ ├── tokens.data.json │ └── tokens.meta.json │ ├── yield_from_use.data.json │ └── yield_from_use.meta.json ├── .vscode └── settings.json ├── 9781484248775.jpg ├── Contributing.md ├── LICENSE.txt ├── README.md ├── chapter01 ├── broader_custom_exception.py ├── custom_exception.py ├── else_in_for_loop_with_break.py ├── else_with_for_loop.py ├── function_docstring.py ├── handle_specific_exception.py ├── lambda_use_to_find_min.py ├── module_level_docstring.py ├── multi_docstring.py ├── multi_docstring_with_typing.py ├── multi_line_class_docstring.py ├── raise_exception_python.py ├── read_csv_cleaner.py ├── read_csv_non_cleaner.py ├── read_file_geneator.py ├── read_file_using_iterator.py ├── single_level_docstring.py ├── sort_dictionary.py ├── use_join.py └── use_of_finally.py ├── chapter02 ├── access_db_iterator.py ├── counter.py ├── default_dict.py ├── defaultdict_example.py ├── deque.py ├── iter_as_prime_number.py ├── json_pretty_printing.py ├── list_as_prime_number.py ├── merge_two_dict.py ├── most_count.py ├── namedtuple_example.py ├── orderdict_example.py ├── pretty_print.py ├── return_as_namedtuple.py ├── return_as_tuple.py ├── simple_namedtuple.py ├── store_db_result_in_list.py ├── switch_using_dict.py ├── use_zip_for_list.py ├── use_zip_to_process_lists.py └── using_list_to_combine_list.py ├── chapter03 ├── class_structure_example.py ├── dont_return_none.py ├── exception_instead_of_return.py ├── logging_example.py ├── misuse_of_lambda.py ├── private_variable.py ├── raising_exception_instead_of_none.py ├── raising_specific_exception.py ├── read_unique_email.py ├── return_non_none_explicitly.py ├── return_none_explicitly.py ├── return_none_explicitly_bad_code.py ├── return_none_explicitly_one_more_way.py ├── right_way_use_abstract.py ├── set_get_using_property.py ├── small_function.py ├── use_class_method_for_serialization.py ├── use_default_arg.py ├── use_property.py ├── using_dunter_for_inheritence.py ├── with_static_use.py └── without_static.py ├── chapter04 ├── cache_using_call.py ├── change_class_behaviour_using_metaclass.py ├── iterator_class.py ├── metaclass_example.py ├── new_keyword_use.py ├── slots_use.py ├── use_call_for_api.py ├── use_get_as_descripter.py └── use_new_for_validation.py ├── chapter05 ├── context_manager_for_context_manager.py ├── context_with_file_read.py ├── decorator_example.py ├── decorator_example_2.py ├── decorators_with_arguments.py ├── define_context_manager.py ├── functool_for_decorator.py ├── lock_file_reading.py ├── logging_decorator.py ├── multiple_decorators.py ├── remote_connection_context_manager.py ├── testing_exception.py ├── use_decorator_lib.py ├── use_lock.py ├── using_func_as_parameter.py └── without_context_manager_read_file.py ├── chapter06 ├── generator_example.py ├── iterator_class.py ├── iterator_with_for_loop.py ├── read_csv_file_using_list.py ├── use_stopiteration.py ├── using_generator.py └── yield_from_use.py ├── chapter07 ├── as_complete_method_use.py ├── async_comprehension.py ├── async_generator.py ├── async_hello.py ├── async_timeout_use.py ├── concurrent_run_tasks.py ├── gather_to_run_concurrently.py ├── iterating_task_using_gather.py ├── multiple_task_to_run_using_curio_run.py ├── pathlib_example.py ├── run_simple_task.py ├── run_two_tasks.py ├── scheduling_tasks.py ├── simple_curio.py ├── trio_concurrent_tasks.py ├── trio_simple.py ├── typing_simple_example.py └── use_await.py ├── chapter08 ├── hypothesis_use_for_property_testing.py ├── logging.yaml ├── logging_use.py ├── pytest_example.py ├── pytest_with_fixture.py ├── stacktrace_logging.py ├── unittest_example.py ├── unittest_with_setup_teardown.py └── use_logging_conf.py └── errata.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.mypy_cache/3.7/@plugins_snapshot.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.mypy_cache/3.7/_ast.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [1, 2, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "8ec0450c6aa8b9e61865d2ae39b6328a", "id": "_ast", "ignore_all": true, "interface_hash": "8e8b1692297c99d0c021419c2a859e04", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/_ast.pyi", "size": 8992, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/_csv.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156043, "dep_lines": [1, 3, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "dc98cf9dc73c3025778275cb8961d1b1", "id": "_csv", "ignore_all": true, "interface_hash": "85d58186b2af3324bf65f5ebc4749952", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/_csv.pyi", "size": 1647, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/_random.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554161492, "dep_lines": [3, 4, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "5157bedb8e3f6177557a116d4f2ebbc3", "id": "_random", "ignore_all": true, "interface_hash": "c380069438a23f43f61b2458928069a3", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/_random.pyi", "size": 493, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/abc.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["typing", "builtins"], "hash": "2584c2f5c4667a231d7afdd171e0b0a2", "id": "abc", "ignore_all": true, "interface_hash": "69e45bf5167f9030797b9de5120e0a82", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/abc.pyi", "size": 613, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/access_db_iterator.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158366, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "046b3256212261705dcf9ff3845189cd", "id": "access_db_iterator", "ignore_all": false, "interface_hash": "3a0f2a26cd89b79f9cb4ddb63ff9d4c5", "mtime": 1554158365, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/access_db_iterator.py", "size": 243, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/ast.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [6, 9, 1], "dep_prios": [5, 5, 5], "dependencies": ["typing", "_ast", "builtins"], "hash": "5cf413210661f731a5394a6be766862c", "id": "ast", "ignore_all": true, "interface_hash": "f7e6e2ff103c553743c939101e7052c5", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/ast.pyi", "size": 1211, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/async_hello.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "async_hello", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "async_hello.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "async_hello.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "async_hello.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "async_hello.__package__", "name": "__package__", "type": "builtins.str"}}, "asyncio": {".class": "SymbolTableNode", "cross_ref": "asyncio", "kind": "Gdef"}, "hello": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["first_print", "second_print"], "flags": ["is_coroutine"], "fullname": "async_hello.hello", "name": "hello", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/async_hello.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/asyncio/coroutines.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164499, "dep_lines": [1, 1, 1], "dep_prios": [5, 5, 30], "dependencies": ["typing", "builtins", "abc"], "hash": "814bbf3ad5c6a31015d406fda12aaaae", "id": "asyncio.coroutines", "ignore_all": true, "interface_hash": "72d06389c0d81be29c6ebe1d3c4facf9", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/asyncio/coroutines.pyi", "size": 263, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/cache_using_call.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554161273, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "1617b973857ff07d3835cbfb9c5ce12c", "id": "cache_using_call", "ignore_all": false, "interface_hash": "fc486a36eb49706b0bbbcf0241016811", "mtime": 1554161272, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/cache_using_call.py", "size": 587, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/concurrent/__init__.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "concurrent", "is_partial_stub_package": false, "is_stub": true, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "concurrent.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "concurrent.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "concurrent.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "concurrent.__package__", "name": "__package__", "type": "builtins.str"}}}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/concurrent/__init__.pyi"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/context_with_file_read.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "context_with_file_read", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.__package__", "name": "__package__", "type": "builtins.str"}}, "fread": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.fread", "name": "fread", "type": "typing.TextIO"}}, "line": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "context_with_file_read.line", "name": "line", "type": "builtins.str"}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/context_with_file_read.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/context_with_file_read.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162444, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "065a6888d6bb11feae1583a39785cb6c", "id": "context_with_file_read", "ignore_all": false, "interface_hash": "081a2ec9c8e3a8bf269afc93ad1bdef6", "mtime": 1554162443, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/context_with_file_read.py", "size": 87, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/counter.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "counter", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "Counter": {".class": "SymbolTableNode", "cross_ref": "collections.Counter", "kind": "Gdef"}, "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "counter.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "counter.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "counter.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "counter.__package__", "name": "__package__", "type": "builtins.str"}}, "contries": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "counter.contries", "name": "contries", "type": {".class": "Instance", "args": ["builtins.str"], "type_ref": "builtins.list"}}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/counter.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/counter.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158523, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["collections", "builtins", "abc", "typing"], "hash": "a64720fe823a84492f6800e67f257244", "id": "counter", "ignore_all": false, "interface_hash": "2aacce3490697c695fa02e17875a5e9d", "mtime": 1554158522, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/counter.py", "size": 234, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/decorator_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554161954, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "481c970508f17c71dd2ee683366ccf70", "id": "decorator_example", "ignore_all": false, "interface_hash": "fe98cbeb07168b0afd938a9598e92964", "mtime": 1554161963, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/decorator_example.py", "size": 339, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/decorator_example_2.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162061, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "8bde4fef0723c1787e9fd8c9bea4a208", "id": "decorator_example_2", "ignore_all": false, "interface_hash": "296215d732978614cadcab7c558c83fa", "mtime": 1554162060, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/decorator_example_2.py", "size": 343, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/decorators_with_arguments.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162177, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "d5c2a969369b29a8981103c1f3ef0e01", "id": "decorators_with_arguments", "ignore_all": false, "interface_hash": "b40257114eef2e7e8b5a7afd739bb090", "mtime": 1554162186, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/decorators_with_arguments.py", "size": 339, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/define_context_manager.meta.json: -------------------------------------------------------------------------------- 1 | {"id": "define_context_manager", "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/define_context_manager.py", "mtime": 1554162654, "size": 406, "hash": "2778b366a46ea10b4f1dd35b61525388", "data_mtime": 1554162616, "dependencies": ["builtins", "abc", "typing"], "suppressed": [], "child_modules": [], "options": {"no_implicit_optional": false, "disallow_any_explicit": false, "disallow_untyped_calls": false, "follow_imports_for_stubs": false, "bazel": false, "new_semantic_analyzer": false, "disallow_any_generics": false, "mypyc": false, "warn_no_return": true, "local_partial_types": false, "disallow_any_unimported": false, "show_none_errors": true, "allow_redefinition": false, "strict_optional": true, "strict_optional_whitelist": null, "ignore_errors": false, "always_true": [], "warn_unused_ignores": false, "warn_return_any": false, "disallow_untyped_defs": false, "disallow_any_expr": false, "disallow_incomplete_defs": false, "follow_imports": "silent", "always_false": [], "disallow_subclassing_any": false, "allow_untyped_globals": false, "check_untyped_defs": false, "ignore_missing_imports": true, "disallow_untyped_decorators": false, "disallow_any_decorated": false, "plugins": [], "platform": "darwin"}, "dep_prios": [5, 30, 30], "dep_lines": [1, 1, 1], "interface_hash": "a914fc13fade01dc59b912a1952c103f", "version_id": "0.670", "ignore_all": false} -------------------------------------------------------------------------------- /.mypy_cache/3.7/deque.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "deque", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "deque.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "deque.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "deque.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "deque.__package__", "name": "__package__", "type": "builtins.str"}}, "deq": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "deque.deq", "name": "deq", "type": {".class": "Instance", "args": ["builtins.str"], "type_ref": "collections.deque"}}}, "deque": {".class": "SymbolTableNode", "cross_ref": "collections.deque", "kind": "Gdef"}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/deque.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/deque.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158616, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["collections", "builtins", "abc", "typing"], "hash": "51da6b8f8e46598415d84ae1665c6e63", "id": "deque", "ignore_all": false, "interface_hash": "939229cd4d71b2ae8bdb0eca2fab16a1", "mtime": 1554158615, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/deque.py", "size": 531, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/dont_return_none.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "dont_return_none", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "dont_return_none.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "dont_return_none.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "dont_return_none.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "dont_return_none.__package__", "name": "__package__", "type": "builtins.str"}}, "read_lines_for_python": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["file_name", "file_type"], "flags": [], "fullname": "dont_return_none.read_lines_for_python", "name": "read_lines_for_python", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/dont_return_none.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/dont_return_none.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159464, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "45c0143209a9560e1786c64c9e261bdc", "id": "dont_return_none", "ignore_all": false, "interface_hash": "8f91870f6277e8bf870145d1032c6ac3", "mtime": 1554159467, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/dont_return_none.py", "size": 423, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/else_in_for_loop_with_break.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "else_in_for_loop_with_break", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_in_for_loop_with_break.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_in_for_loop_with_break.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_in_for_loop_with_break.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_in_for_loop_with_break.__package__", "name": "__package__", "type": "builtins.str"}}, "item": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_in_for_loop_with_break.item", "name": "item", "type": "builtins.int"}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/else_in_for_loop_with_break.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/else_with_for_loop.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "else_with_for_loop", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_with_for_loop.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_with_for_loop.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_with_for_loop.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_with_for_loop.__package__", "name": "__package__", "type": "builtins.str"}}, "item": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "else_with_for_loop.item", "name": "item", "type": "builtins.int"}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/else_with_for_loop.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/else_with_for_loop.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554157172, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "a9c1db982b476febe8a161912646526b", "id": "else_with_for_loop", "ignore_all": false, "interface_hash": "0f0d8ede578eb798eae8cd08e0a4c3b5", "mtime": 1554157172, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/else_with_for_loop.py", "size": 137, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/enum.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159163, "dep_lines": [2, 3, 4, 1], "dep_prios": [10, 5, 5, 5], "dependencies": ["sys", "typing", "abc", "builtins"], "hash": "504f77666e7c336a60d38b160e550061", "id": "enum", "ignore_all": true, "interface_hash": "56ca0e82630b4dccddf7eb50e7da6034", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/enum.pyi", "size": 2585, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/exception_instead_of_return.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "exception_instead_of_return", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "exception_instead_of_return.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "exception_instead_of_return.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "exception_instead_of_return.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "exception_instead_of_return.__package__", "name": "__package__", "type": "builtins.str"}}, "sum": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["first_number", "second_number"], "flags": [], "fullname": "exception_instead_of_return.sum", "name": "sum", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/exception_instead_of_return.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/function_docstring.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "function_docstring", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "function_docstring.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "function_docstring.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "function_docstring.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "function_docstring.__package__", "name": "__package__", "type": "builtins.str"}}, "is_prime_number": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0], "arg_names": ["number"], "flags": [], "fullname": "function_docstring.is_prime_number", "name": "is_prime_number", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/function_docstring.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/function_docstring.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156346, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "10502a501bb0618bb5921ff498aba6bc", "id": "function_docstring", "ignore_all": false, "interface_hash": "2c41b8c345a1cd0e7f8986edb78cfad0", "mtime": 1554156801, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/function_docstring.py", "size": 356, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/functools.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162271, "dep_lines": [1, 2, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "5f2ea2222eb8f8fe81c3d9c44e365c6a", "id": "functools", "ignore_all": true, "interface_hash": "d4c135072c829a7c92ce81c6dc701381", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/functools.pyi", "size": 2955, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/generator_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164078, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "382b6e43e0465d5772b1a4d0fdafa22a", "id": "generator_example", "ignore_all": false, "interface_hash": "995953b209496f5e78ba95d624ad6379", "mtime": 1554164077, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter06/generator_example.py", "size": 234, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/handle_specific_exception.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554157724, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "b6dc7cd398962d2d083f09078009283f", "id": "handle_specific_exception", "ignore_all": false, "interface_hash": "b61bbdf1e75453ff08cb229f2c075fec", "mtime": 1554157723, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/handle_specific_exception.py", "size": 300, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/json/decoder.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156248, "dep_lines": [1, 2, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "9fcec93356d77d81867c25b9c83984dd", "id": "json.decoder", "ignore_all": true, "interface_hash": "52345287b747b915e1a108d77ffdaad7", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/json/decoder.pyi", "size": 1192, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/json/encoder.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156248, "dep_lines": [1, 1, 1], "dep_prios": [5, 5, 30], "dependencies": ["typing", "builtins", "abc"], "hash": "9b2a07d2b39431302a75ddf911710c38", "id": "json.encoder", "ignore_all": true, "interface_hash": "a7a24bc2a0cd97fff1ea4cbf6d8feeed", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/json/encoder.pyi", "size": 844, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/lambda_use_to_find_min.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156977, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "b20d413d0381887e78fb0e8b5d209420", "id": "lambda_use_to_find_min", "ignore_all": false, "interface_hash": "83feb71223b54a6daba23f00ca0fc38d", "mtime": 1554156995, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/lambda_use_to_find_min.py", "size": 150, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/list_as_prime_number.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "list_as_prime_number", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "list_as_prime_number.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "list_as_prime_number.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "list_as_prime_number.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "list_as_prime_number.__package__", "name": "__package__", "type": "builtins.str"}}, "get_prime_numbers": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["lower", "higher"], "flags": [], "fullname": "list_as_prime_number.get_prime_numbers", "name": "get_prime_numbers", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/list_as_prime_number.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/list_as_prime_number.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158246, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "63b04675896d54106588bdfb36a7461e", "id": "list_as_prime_number", "ignore_all": false, "interface_hash": "98ae3bb1d1ff1bae53c8e7753ef11031", "mtime": 1554158244, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/list_as_prime_number.py", "size": 405, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/lock_file_reading.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554163138, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 5], "dependencies": ["builtins", "abc", "typing"], "hash": "1df22426bb82ed605c767d1dfa192030", "id": "lock_file_reading", "ignore_all": false, "interface_hash": "6fe92cedca1412eced3d7fe905542894", "mtime": 1554163137, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/lock_file_reading.py", "size": 169, "suppressed": ["filelock"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/logging_decorator.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162234, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "ad62a50a045f45d39742252ccce3c5e5", "id": "logging_decorator", "ignore_all": false, "interface_hash": "d4a1c4a9e8c88e6f9dcafeead6b46b9c", "mtime": 1554162251, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/logging_decorator.py", "size": 277, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/merge_two_dict.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158969, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "3eab41850cfefe4edd382e8f46451c25", "id": "merge_two_dict", "ignore_all": false, "interface_hash": "08ccf1c30514623bbc9d48840615af0a", "mtime": 1554158967, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/merge_two_dict.py", "size": 270, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/mmap.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [1, 2, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "a527e2c242313095d9dc614864bfe399", "id": "mmap", "ignore_all": true, "interface_hash": "e6090aaf0c96461e5475a1cf48311aaf", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/mmap.pyi", "size": 3115, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/module_level_docstring.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "module_level_docstring", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "module_level_docstring.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "module_level_docstring.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "module_level_docstring.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "module_level_docstring.__package__", "name": "__package__", "type": "builtins.str"}}, "json": {".class": "SymbolTableNode", "cross_ref": "json", "kind": "Gdef"}, "urllib3": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": ["is_suppressed_import"], "fullname": "module_level_docstring.urllib3", "name": "urllib3", "type": {".class": "AnyType", "missing_import_name": "module_level_docstring.urllib3", "source_any": null, "type_of_any": 3}}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/module_level_docstring.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/most_count.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158570, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["collections", "builtins", "abc", "typing"], "hash": "7d52fe771ebe024c427fbd6d92e43f14", "id": "most_count", "ignore_all": false, "interface_hash": "25e30242051520d95405aba767441689", "mtime": 1554158569, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/most_count.py", "size": 310, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/multi_docstring.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "multi_docstring", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "multi_docstring.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "multi_docstring.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "multi_docstring.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "multi_docstring.__package__", "name": "__package__", "type": "builtins.str"}}, "call_weather_api": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["url", "location"], "flags": [], "fullname": "multi_docstring.call_weather_api", "name": "call_weather_api", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/multi_docstring.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/multi_docstring.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156436, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "d43c8b8999542f8944fc6b1764c21170", "id": "multi_docstring", "ignore_all": false, "interface_hash": "520468e118c9596c77094aea394078b1", "mtime": 1554156435, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/multi_docstring.py", "size": 554, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/multiple_decorators.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162135, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "0397d9b9a10cb2e9bacc6c6dc7ef7fed", "id": "multiple_decorators", "ignore_all": false, "interface_hash": "87522e7b35981670cf98ab49ef2e7816", "mtime": 1554162134, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/multiple_decorators.py", "size": 453, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/namedtuple.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158683, "dep_lines": [2, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["collections", "builtins", "abc", "typing"], "hash": "03b314b1965cbc17050f0571ead2e5c3", "id": "namedtuple", "ignore_all": false, "interface_hash": "6044cdbce31667afdec42df032be4adb", "mtime": 1554158682, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/namedtuple.py", "size": 293, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/namedtuple_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158820, "dep_lines": [2, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["collections", "builtins", "abc", "typing"], "hash": "03b314b1965cbc17050f0571ead2e5c3", "id": "namedtuple_example", "ignore_all": false, "interface_hash": "bc6269d9e4099fd5e88873488fad510e", "mtime": 1554158819, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/namedtuple_example.py", "size": 293, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/os/path.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [5, 6, 7, 15, 1], "dep_prios": [10, 10, 5, 5, 30], "dependencies": ["os", "sys", "typing", "builtins", "abc"], "hash": "5d39840f32e3d0c15304c87316a5d570", "id": "os.path", "ignore_all": true, "interface_hash": "814f81168a9852e44f283874b2e49e3f", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/os/path.pyi", "size": 6194, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/pathlib_example.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "pathlib_example", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "pathlib_example.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "pathlib_example.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "pathlib_example.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "pathlib_example.__package__", "name": "__package__", "type": "builtins.str"}}, "path": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "pathlib_example.path", "name": "path", "type": "pathlib.Path"}}, "pathlib": {".class": "SymbolTableNode", "cross_ref": "pathlib", "kind": "Gdef"}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/pathlib_example.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/pathlib_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165309, "dep_lines": [1, 1, 1, 1], "dep_prios": [10, 5, 30, 30], "dependencies": ["pathlib", "builtins", "abc", "typing"], "hash": "08ad54d432f05ed1b46b572ed29d13ef", "id": "pathlib_example", "ignore_all": false, "interface_hash": "5985277e294ddac5c91fc7e3946929a7", "mtime": 1554165309, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/pathlib_example.py", "size": 159, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/posix.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156042, "dep_lines": [5, 6, 8, 1, 1], "dep_prios": [10, 5, 5, 5, 30], "dependencies": ["sys", "typing", "os", "builtins", "abc"], "hash": "af8fd8737899ef190f0acb1ff376fbc2", "id": "posix", "ignore_all": true, "interface_hash": "94c6f8fa60937f935c365f6226ade7df", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/posix.pyi", "size": 1798, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/pprint.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159032, "dep_lines": [6, 7, 1, 1], "dep_prios": [10, 5, 5, 30], "dependencies": ["sys", "typing", "builtins", "abc"], "hash": "59e5db3e2aa4338f174c706f3bf15f0e", "id": "pprint", "ignore_all": true, "interface_hash": "e25591c66b0c3129dd767de6747e4743", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/pprint.pyi", "size": 1589, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/private_variable.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554160428, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "b978e2b9c631c12102f4c3620b604fea", "id": "private_variable", "ignore_all": false, "interface_hash": "dd08940cc33c57597f82b6f0199d29d8", "mtime": 1554160427, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/private_variable.py", "size": 243, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/pytest_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165614, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "328d34c447331db4026f7888bdb5efdd", "id": "pytest_example", "ignore_all": false, "interface_hash": "2413eea91b2b58f5111265db45085645", "mtime": 1554165612, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter08/pytest_example.py", "size": 106, "suppressed": ["pytest"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/pytest_with_fixture.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165644, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "e5bb5d05f4a09c8803c72e81fd3f078a", "id": "pytest_with_fixture", "ignore_all": false, "interface_hash": "59495327d3190dc505ce3bc6d4041c2a", "mtime": 1554165643, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter08/pytest_with_fixture.py", "size": 381, "suppressed": ["pytest"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/raise_exception_python.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "raise_exception_python", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raise_exception_python.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raise_exception_python.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raise_exception_python.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raise_exception_python.__package__", "name": "__package__", "type": "builtins.str"}}, "division": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["dividend", "divisor"], "flags": [], "fullname": "raise_exception_python.division", "name": "division", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/raise_exception_python.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/raise_exception_python.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554157317, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "46c8c9a04f58ae31cb723d9f834c738f", "id": "raise_exception_python", "ignore_all": false, "interface_hash": "7563198ae491c97ab46643704f05f148", "mtime": 1554157316, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/raise_exception_python.py", "size": 222, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/raising_exception_instead_of_none.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "raising_exception_instead_of_none", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raising_exception_instead_of_none.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raising_exception_instead_of_none.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raising_exception_instead_of_none.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "raising_exception_instead_of_none.__package__", "name": "__package__", "type": "builtins.str"}}, "read_lines_for_python": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0, 0], "arg_names": ["file_name", "file_type"], "flags": [], "fullname": "raising_exception_instead_of_none.read_lines_for_python", "name": "read_lines_for_python", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/raising_exception_instead_of_none.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/re.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159163, "dep_lines": [8, 9, 16, 1, 1], "dep_prios": [10, 5, 10, 5, 30], "dependencies": ["sys", "typing", "enum", "builtins", "abc"], "hash": "034a715da01ae8219a3d9bd0a902223d", "id": "re", "ignore_all": true, "interface_hash": "4fa6e27ac6d503527dba816114e4e259", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/re.pyi", "size": 4925, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/read_csv_cleaner.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156512, "dep_lines": [1, 1, 1, 1], "dep_prios": [10, 5, 30, 30], "dependencies": ["csv", "builtins", "abc", "typing"], "hash": "766a79a1ff0e768ef7b96662019e308d", "id": "read_csv_cleaner", "ignore_all": false, "interface_hash": "73f7874710267cffdc27ad33eb9ffbae", "mtime": 1554156549, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/read_csv_cleaner.py", "size": 520, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/read_file_geneator.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "read_file_geneator", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "read_file_geneator.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "read_file_geneator.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "read_file_geneator.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "read_file_geneator.__package__", "name": "__package__", "type": "builtins.str"}}, "read_file": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0], "arg_names": ["file_name"], "flags": [], "fullname": "read_file_geneator.read_file", "name": "read_file", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/read_file_geneator.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/read_file_geneator.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554157114, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "6eb07cdb3eb932f5394b8a8de93e6ad0", "id": "read_file_geneator", "ignore_all": false, "interface_hash": "a088182eb5ba96c90b7d1b0084c69173", "mtime": 1554157113, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/read_file_geneator.py", "size": 174, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/return_none_explicitly.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159540, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "0a00962b6c550f7228cb93e08b74fc3f", "id": "return_none_explicitly", "ignore_all": false, "interface_hash": "92ece25b2c44dc68cc2ac5ed65a511a1", "mtime": 1554159539, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/return_none_explicitly.py", "size": 270, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/selectors.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164499, "dep_lines": [4, 5, 6, 1], "dep_prios": [5, 5, 10, 5], "dependencies": ["typing", "abc", "socket", "builtins"], "hash": "f21023fd0e6242b755a4b0086831adc7", "id": "selectors", "ignore_all": true, "interface_hash": "0cac391f7739013643ee08caba7b7489", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/selectors.pyi", "size": 3728, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/set_get_using_property.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554160027, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "3998080eaf3193ae251fc0863a86d1a7", "id": "set_get_using_property", "ignore_all": false, "interface_hash": "7bdd81b571b3d5ee5b0e9d51980565b2", "mtime": 1554160026, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/set_get_using_property.py", "size": 353, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/simple_curio.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164985, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "b1cfb24500da9d25434b4eb5fa4d1b5f", "id": "simple_curio", "ignore_all": false, "interface_hash": "f9d2095cc6ac4d825084a3a13be0cf47", "mtime": 1554164984, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/simple_curio.py", "size": 182, "suppressed": ["curio"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/simple_namedtuple.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158080, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "0f4e6c3b2149a88e215a90b84279b77b", "id": "simple_namedtuple", "ignore_all": false, "interface_hash": "ae1fae793667ab3cbcf2a73dda2e8dcc", "mtime": 1554158080, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/simple_namedtuple.py", "size": 118, "suppressed": ["namedtuple"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/single_level_docstring.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156589, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "fc93d494c0f597be01783c0c67184167", "id": "single_level_docstring", "ignore_all": false, "interface_hash": "6497d566a41884252c90ff83f108f5a4", "mtime": 1554156588, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/single_level_docstring.py", "size": 113, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/small_function.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159208, "dep_lines": [1, 1, 1, 1, 1], "dep_prios": [10, 5, 30, 30, 30], "dependencies": ["re", "builtins", "abc", "enum", "typing"], "hash": "7dcee9b36bf357fda08c2b189e21616a", "id": "small_function", "ignore_all": false, "interface_hash": "7ced9030090573e16cd221a346fa0904", "mtime": 1554159231, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/small_function.py", "size": 541, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/sort_dictionary.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156728, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "2317755dee0684a2be3f106114c808b5", "id": "sort_dictionary", "ignore_all": false, "interface_hash": "92747e2289f8c38b1084862f3e183ce1", "mtime": 1554156727, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/sort_dictionary.py", "size": 546, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/sqlite3/__init__.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": ["sqlite3.dbapi2"], "data_mtime": 1554162787, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["sqlite3.dbapi2", "builtins"], "hash": "7bcb9e3afd5d513c6e43a64f93eb36a7", "id": "sqlite3", "ignore_all": true, "interface_hash": "7dd40be439ff3d3d6abee23ac1a594cf", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/sqlite3/__init__.pyi", "size": 43, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/ssl.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164499, "dep_lines": [3, 6, 7, 1, 1], "dep_prios": [5, 10, 10, 5, 30], "dependencies": ["typing", "socket", "sys", "builtins", "abc"], "hash": "9b336086049ae6046114bdd3a912543a", "id": "ssl", "ignore_all": true, "interface_hash": "852085712edd8d2e8f4f07befb54e7bc", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/ssl.pyi", "size": 12043, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/store_db_result_in_list.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158338, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "fe2c944c9e25ad06f3de57de9a3a7875", "id": "store_db_result_in_list", "ignore_all": false, "interface_hash": "635de91322f38ef2b4fce17d3af5b5f5", "mtime": 1554158337, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/store_db_result_in_list.py", "size": 326, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/string.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165409, "dep_lines": [5, 1, 1], "dep_prios": [5, 5, 30], "dependencies": ["typing", "builtins", "abc"], "hash": "8c133962915479b7b3d537abbd00ccf4", "id": "string", "ignore_all": true, "interface_hash": "d98a8896c36b67950969cca701ffd9b2", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/3/string.pyi", "size": 1771, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/testing_exception.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554163102, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "9f15a35daea08ab73da678261d2c2c40", "id": "testing_exception", "ignore_all": false, "interface_hash": "50b9ac2c277cd9b3ddca1ee9b3429893", "mtime": 1554163101, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/testing_exception.py", "size": 378, "suppressed": ["pytest"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/time.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162787, "dep_lines": [4, 5, 7, 1, 1], "dep_prios": [10, 5, 5, 5, 30], "dependencies": ["sys", "typing", "types", "builtins", "abc"], "hash": "d0848c9c98081f61adce6cdcd1ea12f5", "id": "time", "ignore_all": true, "interface_hash": "124cd0ed8e2f0fdeab4792db8da72d9c", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/stdlib/2and3/time.pyi", "size": 3866, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/trio_concurrent_tasks.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165224, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "a3309ad0309b8a3f9c800dc4978a5e10", "id": "trio_concurrent_tasks", "ignore_all": false, "interface_hash": "78b18ab023c6684ff6cd3f82ae0bca95", "mtime": 1554165222, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/trio_concurrent_tasks.py", "size": 957, "suppressed": ["trio"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/trio_simple.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165181, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 10], "dependencies": ["builtins", "abc", "typing"], "hash": "c2e68a5e7b8e7ec90a6a3de71af64de8", "id": "trio_simple", "ignore_all": false, "interface_hash": "485d7d9557ed10b1b197a2a894b28822", "mtime": 1554165206, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/trio_simple.py", "size": 130, "suppressed": ["trio"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/typing_simple_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165255, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "c673437f1799970b653870ab4ea6d56c", "id": "typing_simple_example", "ignore_all": false, "interface_hash": "bf7a2541a1b9aed7168fdc52d1ad426e", "mtime": 1554165254, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter07/typing_simple_example.py", "size": 121, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/unittest_example.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165597, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 5, 30, 30], "dependencies": ["unittest", "builtins", "abc", "typing"], "hash": "18d8347212ee1e5c84f911880bc3b62f", "id": "unittest_example", "ignore_all": false, "interface_hash": "b64950c26c6648d7f2c88645d95be9d7", "mtime": 1554165595, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter08/unittest_example.py", "size": 272, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_decorator_lib.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162354, "dep_lines": [1, 1, 1, 1], "dep_prios": [5, 30, 30, 5], "dependencies": ["builtins", "abc", "typing"], "hash": "310fa7357766be3764a62d47ee5a97b6", "id": "use_decorator_lib", "ignore_all": false, "interface_hash": "3aa2ce429815ae3b85f8d4213dc1b6e8", "mtime": 1554162353, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/use_decorator_lib.py", "size": 301, "suppressed": ["decorator"], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_default_arg.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "use_default_arg", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_default_arg.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_default_arg.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_default_arg.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_default_arg.__package__", "name": "__package__", "type": "builtins.str"}}, "calculate_sum": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [1, 1], "arg_names": ["first_number", "second_number"], "flags": [], "fullname": "use_default_arg.calculate_sum", "name": "calculate_sum", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/use_default_arg.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_default_arg.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159491, "dep_lines": [1], "dep_prios": [5], "dependencies": ["builtins"], "hash": "4bc73d452810f676cbb9ee8fe0c4e07d", "id": "use_default_arg", "ignore_all": false, "interface_hash": "8d7c10d8210ad0529d6c5c33d3b2fd91", "mtime": 1554159490, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/use_default_arg.py", "size": 150, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_join.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554156091, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "ebaea45d98f1e9b87eba0b32dd1ba92b", "id": "use_join", "ignore_all": false, "interface_hash": "9c7038b8d536d1d28f78c1096b35b57d", "mtime": 1554156090, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter01/use_join.py", "size": 213, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_lock.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "use_lock", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_lock.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_lock.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_lock.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_lock.__package__", "name": "__package__", "type": "builtins.str"}}, "con": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_lock.con", "name": "con", "type": "sqlite3.dbapi2.Connection"}}, "sqlite3": {".class": "SymbolTableNode", "cross_ref": "sqlite3", "kind": "Gdef"}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/use_lock.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_lock.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554162787, "dep_lines": [1, 1, 1, 1, 1], "dep_prios": [10, 5, 30, 30, 30], "dependencies": ["sqlite3", "builtins", "abc", "sqlite3.dbapi2", "typing"], "hash": "7b8764652fed7e0116acfec5252f2ef2", "id": "use_lock", "ignore_all": false, "interface_hash": "6626df8e64d2a87a25a82958855be291", "mtime": 1554162786, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/use_lock.py", "size": 567, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_new_for_validation.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554160963, "dep_lines": [1, 1, 1], "dep_prios": [5, 5, 30], "dependencies": ["abc", "builtins", "typing"], "hash": "bcb98d7c48726907d510b08a3cc87f77", "id": "use_new_for_validation", "ignore_all": false, "interface_hash": "50a7880ad5d32d4125389e91da9ec963", "mtime": 1554160979, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/use_new_for_validation.py", "size": 721, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_property.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554159996, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "e1ebb0c897e3f8c9b1818e954aef860a", "id": "use_property", "ignore_all": false, "interface_hash": "9bafae0e8676cc16bf58b48511bbf369", "mtime": 1554159995, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/use_property.py", "size": 251, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_zip_for_list.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "use_zip_for_list", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_for_list.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_for_list.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_for_list.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_for_list.__package__", "name": "__package__", "type": "builtins.str"}}, "get_user_salary_info": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [], "arg_names": [], "flags": [], "fullname": "use_zip_for_list.get_user_salary_info", "name": "get_user_salary_info", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/use_zip_for_list.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_zip_for_list.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158404, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "424cd24c000a9df82ff04a40a76dda98", "id": "use_zip_for_list", "ignore_all": false, "interface_hash": "e928abe41d86da514b5577974965a0f1", "mtime": 1554158403, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/use_zip_for_list.py", "size": 371, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_zip_to_process_lists.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "use_zip_to_process_lists", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_to_process_lists.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_to_process_lists.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_to_process_lists.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "use_zip_to_process_lists.__package__", "name": "__package__", "type": "builtins.str"}}, "get_user_salary_info": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [], "arg_names": [], "flags": [], "fullname": "use_zip_to_process_lists.get_user_salary_info", "name": "get_user_salary_info", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/use_zip_to_process_lists.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/use_zip_to_process_lists.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554158484, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "a656754605aff5482abdbfaa6268e534", "id": "use_zip_to_process_lists", "ignore_all": false, "interface_hash": "da546cbe3e27ac6f31f7e460b1257707", "mtime": 1554158482, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/use_zip_to_process_lists.py", "size": 356, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/using_func_as_parameter.meta.json: -------------------------------------------------------------------------------- 1 | {"id": "using_func_as_parameter", "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/using_func_as_parameter.py", "mtime": 1554161913, "size": 411, "hash": "c5e9770232fcaa104ba1c55e8d958442", "data_mtime": 1554161665, "dependencies": ["builtins", "abc", "typing"], "suppressed": [], "child_modules": [], "options": {"disallow_any_decorated": false, "always_false": [], "local_partial_types": false, "disallow_any_explicit": false, "disallow_untyped_defs": false, "disallow_any_expr": false, "warn_return_any": false, "warn_no_return": true, "always_true": [], "disallow_subclassing_any": false, "ignore_missing_imports": true, "strict_optional": true, "allow_redefinition": false, "mypyc": false, "strict_optional_whitelist": null, "no_implicit_optional": false, "allow_untyped_globals": false, "new_semantic_analyzer": false, "check_untyped_defs": false, "show_none_errors": true, "follow_imports_for_stubs": false, "disallow_untyped_calls": false, "warn_unused_ignores": false, "bazel": false, "disallow_untyped_decorators": false, "disallow_any_generics": false, "ignore_errors": false, "follow_imports": "silent", "disallow_any_unimported": false, "disallow_incomplete_defs": false, "plugins": [], "platform": "darwin"}, "dep_prios": [5, 30, 30], "dep_lines": [1, 1, 1], "interface_hash": "86fbdd1cac9c499b6077d370e8c55205", "version_id": "0.670", "ignore_all": false} -------------------------------------------------------------------------------- /.mypy_cache/3.7/using_list_to_combine_list.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "using_list_to_combine_list", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "using_list_to_combine_list.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "using_list_to_combine_list.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "using_list_to_combine_list.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "using_list_to_combine_list.__package__", "name": "__package__", "type": "builtins.str"}}, "get_user_salary_info": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [], "arg_names": [], "flags": [], "fullname": "using_list_to_combine_list.get_user_salary_info", "name": "get_user_salary_info", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter02/using_list_to_combine_list.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/with_static_use.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554160072, "dep_lines": [1], "dep_prios": [5], "dependencies": ["builtins"], "hash": "d6fe3d059b738bdd2209168ee3e1867f", "id": "with_static_use", "ignore_all": false, "interface_hash": "38f4970b8ddd676f5ecc09b57b0062c9", "mtime": 1554160071, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/with_static_use.py", "size": 388, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/without_context_manager_read_file.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "without_context_manager_read_file", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "without_context_manager_read_file.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "without_context_manager_read_file.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "without_context_manager_read_file.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "without_context_manager_read_file.__package__", "name": "__package__", "type": "builtins.str"}}, "read_file": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0], "arg_names": ["file_name"], "flags": [], "fullname": "without_context_manager_read_file.read_file", "name": "read_file", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter04/without_context_manager_read_file.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/without_static.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554160051, "dep_lines": [1], "dep_prios": [5], "dependencies": ["builtins"], "hash": "c64a478dd9d395492a78b02911b07af1", "id": "without_static", "ignore_all": false, "interface_hash": "2c1c2ca90c2fcec5d4c8c9ea30d00de8", "mtime": 1554160050, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter03/without_static.py", "size": 361, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/emitter.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165569, "dep_lines": [1, 2, 1], "dep_prios": [5, 5, 5], "dependencies": ["typing", "yaml.error", "builtins"], "hash": "ffd8004ca571c4b8cad6815495d4dc64", "id": "yaml.emitter", "ignore_all": true, "interface_hash": "ab263b824c8a4e32afcb42f954816990", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/emitter.pyi", "size": 4319, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/error.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165568, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["typing", "builtins"], "hash": "0ac589efec9bff41874a4eed7ae26eed", "id": "yaml.error", "ignore_all": true, "interface_hash": "645183e410de57070f09ac5b33fdbf66", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/error.pyi", "size": 689, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/events.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165568, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["typing", "builtins"], "hash": "21d50e9b8da45224763667627416c939", "id": "yaml.events", "ignore_all": true, "interface_hash": "696a2ee3190da7345e47ea3bbd523acb", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/events.pyi", "size": 2068, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/nodes.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165568, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["typing", "builtins"], "hash": "ad3f018c5ccb68017b270fef63e3b0a4", "id": "yaml.nodes", "ignore_all": true, "interface_hash": "46f2f170abbc9eaca5246eb2f89b090d", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/nodes.pyi", "size": 923, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/parser.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165569, "dep_lines": [1, 2, 1], "dep_prios": [5, 5, 5], "dependencies": ["typing", "yaml.error", "builtins"], "hash": "b5b4d9aa7e5349029a0fb51d33207b6b", "id": "yaml.parser", "ignore_all": true, "interface_hash": "ee46c9824852273ba518c0f549f0eaa9", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/parser.pyi", "size": 1761, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/reader.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165569, "dep_lines": [1, 2, 1], "dep_prios": [5, 5, 5], "dependencies": ["typing", "yaml.error", "builtins"], "hash": "10ddd03b646e2b3e14ea72e8d8cf372b", "id": "yaml.reader", "ignore_all": true, "interface_hash": "31a8ef56f48b767282ef6dd2f0e43ce6", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/reader.pyi", "size": 1083, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/scanner.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165569, "dep_lines": [1, 2, 1], "dep_prios": [5, 5, 5], "dependencies": ["typing", "yaml.error", "builtins"], "hash": "9109f2ab17137d2515286b2c57c7bb98", "id": "yaml.scanner", "ignore_all": true, "interface_hash": "8e4fccfb36a571f7f8185338c4df698c", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/scanner.pyi", "size": 3796, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yaml/tokens.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554165568, "dep_lines": [1, 1], "dep_prios": [5, 5], "dependencies": ["typing", "builtins"], "hash": "4f4b7e20af4a3b96b75aee16b5dabc06", "id": "yaml.tokens", "ignore_all": true, "interface_hash": "3bb22825e5a02e24049c6aaf1156761b", "mtime": 1552362609, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/miniconda3/envs/codev/lib/python3.7/site-packages/mypy/typeshed/third_party/2and3/yaml/tokens.pyi", "size": 2394, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yield_from_use.data.json: -------------------------------------------------------------------------------- 1 | {".class": "MypyFile", "_fullname": "yield_from_use", "is_partial_stub_package": false, "is_stub": false, "names": {".class": "SymbolTable", "__doc__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "yield_from_use.__doc__", "name": "__doc__", "type": "builtins.str"}}, "__file__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "yield_from_use.__file__", "name": "__file__", "type": "builtins.str"}}, "__name__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "yield_from_use.__name__", "name": "__name__", "type": "builtins.str"}}, "__package__": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "Var", "flags": [], "fullname": "yield_from_use.__package__", "name": "__package__", "type": "builtins.str"}}, "flat_list": {".class": "SymbolTableNode", "kind": "Gdef", "node": {".class": "FuncDef", "arg_kinds": [0], "arg_names": ["iter_values"], "flags": ["is_generator"], "fullname": "yield_from_use.flat_list", "name": "flat_list", "type": null}}}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter06/yield_from_use.py"} -------------------------------------------------------------------------------- /.mypy_cache/3.7/yield_from_use.meta.json: -------------------------------------------------------------------------------- 1 | {"child_modules": [], "data_mtime": 1554164402, "dep_lines": [1, 1, 1], "dep_prios": [5, 30, 30], "dependencies": ["builtins", "abc", "typing"], "hash": "23067207c2e6c36b67efda7f8763c2b2", "id": "yield_from_use", "ignore_all": false, "interface_hash": "dc652da3b579104ab3a8270363299a7f", "mtime": 1554164401, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "silent", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "local_partial_types": false, "mypyc": false, "new_semantic_analyzer": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unused_ignores": false}, "path": "/Users/skapil/Documents/work/other/py/clean_python/chapter06/yield_from_use.py", "size": 276, "suppressed": [], "version_id": "0.670"} -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/Users/skapil/miniconda3/envs/codev/bin/python", 3 | "python.linting.pylintEnabled": true, 4 | "python.formatting.provider": "black" 5 | } -------------------------------------------------------------------------------- /9781484248775.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/clean-python/41a799afebb8470a53752f5588433bf58c965305/9781484248775.jpg -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Apress Source Code 2 | 3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. 4 | 5 | ## How to Contribute 6 | 7 | 1. Make sure you have a GitHub account. 8 | 2. Fork the repository for the relevant book. 9 | 3. Create a new branch on which to make your change, e.g. 10 | `git checkout -b my_code_contribution` 11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. 12 | 5. Submit a pull request. 13 | 14 | Thank you for your contribution! -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apress Source Code 2 | 3 | This repository accompanies [*Clean Python*](https://www.apress.com/9781484248775) by Sunil Kapil (Apress, 2019). 4 | 5 | [comment]: #cover 6 | ![Cover image](9781484248775.jpg) 7 | 8 | Download the files as a zip using the green button, or clone the repository to your machine using Git. 9 | 10 | ## Releases 11 | 12 | Release v1.0 corresponds to the code in the published book, without corrections or updates. 13 | 14 | ## Contributions 15 | 16 | See the file Contributing.md for more information on how you can contribute to this repository. -------------------------------------------------------------------------------- /chapter01/broader_custom_exception.py: -------------------------------------------------------------------------------- 1 | class WrongInstanceIDError(Exception): 2 | """Raise the exception whenever Invalid instance found.""" 3 | def __init__(self, message=None, errros=None): 4 | # Calling the base class constructor with the parameter it needs 5 | super().__init__(message) 6 | # New for your custom code 7 | self.errors = errors 8 | 9 | 10 | ec2 = session.get_client('ec2', 'us-east-2') 11 | try: 12 | parsed = ec2.describe_instances(InstanceIds=['i-badid']) 13 | except ClientError as e: 14 | logger.error("Received error: %s", e, exc_info=True) 15 | # Only worry about a specific service error code 16 | if e.response['Error']['Code'] == 'InvalidInstanceID.NotFound': 17 | raise WrongInstanceIDError(message=exc_info, errors=e) 18 | -------------------------------------------------------------------------------- /chapter01/custom_exception.py: -------------------------------------------------------------------------------- 1 | class UserNotFoundError(Exception): 2 | """Raise the exception when user not found.""" 3 | def __init__(self, message=None, erros=None): 4 | # Calling the base class constructor with the parameter it needs 5 | super().__init__(message) 6 | # New for your custom code 7 | self.errors = errors 8 | 9 | 10 | def get_user_info(user_obj): 11 | """Get user information from DB.""" 12 | user = get_user_from_db(user_obj) 13 | if not user: 14 | raise UserNotFoundException(f"No user found of this id: {user_obj.id}") 15 | 16 | get_user_info(user_obj) 17 | 18 | """ 19 | >>> UserNotFoundException: No user found of this id: 897867 20 | """ 21 | -------------------------------------------------------------------------------- /chapter01/else_in_for_loop_with_break.py: -------------------------------------------------------------------------------- 1 | for item in [1, 2, 3]: 2 | if item % 2 == 0: 3 | break 4 | print("Then") 5 | else: 6 | print("Else") 7 | 8 | 9 | """ 10 | Result: 11 | >>> Then 12 | """ -------------------------------------------------------------------------------- /chapter01/else_with_for_loop.py: -------------------------------------------------------------------------------- 1 | for item in [1, 2, 3]: 2 | print("Then") 3 | else: 4 | print("Else") 5 | 6 | """ 7 | Result: 8 | >>> Then 9 | >>> Then 10 | >>> Then 11 | >>> Else 12 | """ -------------------------------------------------------------------------------- /chapter01/function_docstring.py: -------------------------------------------------------------------------------- 1 | def is_prime_number(number): 2 | """Check for prime number. 3 | 4 | Check the given number is prime number or not by checking against all the 5 | numbers less the square root of given number. 6 | 7 | :param number: Given number to check for prime. 8 | :type number: int 9 | :return: True if number is prime otherwise False. 10 | :rtype: boolean 11 | """ 12 | pass 13 | -------------------------------------------------------------------------------- /chapter01/handle_specific_exception.py: -------------------------------------------------------------------------------- 1 | def get_even_list(num_list): 2 | """Get list of odd numbers from given list.""" 3 | # This can raise NoneType or TypeError exceptions 4 | return [item for item in num_list if item % 2 == 0] 5 | 6 | 7 | numbers = None 8 | try: 9 | get_even_list(numbers) 10 | except TypeError: 11 | print("None Value has been provided.") 12 | -------------------------------------------------------------------------------- /chapter01/lambda_use_to_find_min.py: -------------------------------------------------------------------------------- 1 | data = [[7], [3], [0], [8], [1], [4]] 2 | 3 | 4 | def min_val(data): 5 | """Find minimum value from the data list.""" 6 | return min(data, key=lambda x:len(x)) 7 | -------------------------------------------------------------------------------- /chapter01/module_level_docstring.py: -------------------------------------------------------------------------------- 1 | """This module contains all the network related request. 2 | 3 | This module will check for all the exceptions while making the network calls 4 | and raise exceptions for any unknown exception. Make sure that when you use 5 | this module, you handle these exceptions in client code as: 6 | NetworkError exception for network calls. 7 | NetworkNotFound exception if network not found. 8 | """ 9 | 10 | 11 | import urllib3 12 | import json 13 | -------------------------------------------------------------------------------- /chapter01/multi_docstring.py: -------------------------------------------------------------------------------- 1 | def call_weather_api(url, location): 2 | """Get the weather of specific location. 3 | 4 | Calling weather api to check for weather by using weather api and location. 5 | Make sure you provice city name only, country and county names won't be accepted 6 | and will throw exception if not found the city name. 7 | 8 | :param url: URL of the api to get weather. 9 | :type url: str 10 | :param location: Location of the city to get the weather. 11 | :type location: str 12 | :return: Give the weather information of given location. 13 | :rtype: str 14 | """ 15 | pass 16 | -------------------------------------------------------------------------------- /chapter01/multi_docstring_with_typing.py: -------------------------------------------------------------------------------- 1 | def call_weather_api(url: str, location: str) -> str: 2 | """Get the weather of specific location. 3 | 4 | Calling weather api to check for weather by using weather api and location. 5 | Make sure you provice city name only, country and county names won't be 6 | accepted and will throw exception if not found the city name. 7 | """ 8 | pass 9 | -------------------------------------------------------------------------------- /chapter01/multi_line_class_docstring.py: -------------------------------------------------------------------------------- 1 | class Student: 2 | """Student class information. 3 | 4 | This class handle actions performed by a student. 5 | This class provides information about student full name, age, roll-number and other information. 6 | 7 | Usage: 8 | import student 9 | 10 | student = student.Student() 11 | student.get_name() 12 | >>> 678998 13 | """ 14 | 15 | def __init__(self): 16 | pass 17 | -------------------------------------------------------------------------------- /chapter01/raise_exception_python.py: -------------------------------------------------------------------------------- 1 | def division(dividend, divisor): 2 | """Perform airthmetic division.""" 3 | try: 4 | return dividend/divisor 5 | except ZeroDivisionError as zero: 6 | raise ZeroDivisionError("Please provide greater than 0 value") 7 | -------------------------------------------------------------------------------- /chapter01/read_csv_cleaner.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | 4 | def process_salary(csv_reader): 5 | """Process salary of user from csv file.""" 6 | line_count = 0 7 | for row in csv_reader: 8 | if line_count == 0: 9 | print(f'Column names are {", ".join(row)}') 10 | line_count += 1 11 | print(f'\t{row["name"]} salary: {row["salary"]}') 12 | line_count += 1 13 | print(f'Completed {line_count} lines.') 14 | 15 | 16 | with open('employee.txt', mode='r') as csv_file: 17 | csv_reader = csv.DictReader(csv_file) 18 | line_count = 0 19 | process_salary(csv_reader) 20 | -------------------------------------------------------------------------------- /chapter01/read_csv_non_cleaner.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | with open("employee.csv", mode="r") as csv_file: 4 | csv_reader = csv.DictReader(csv_file) 5 | line_count = 0 6 | for row in csv_reader: 7 | if line_count == 0: 8 | print(f'Column names are {", ".join(row)}') 9 | line_count += 1 10 | print(f'\t{row["name"]} salary: {row["salary"]}' 11 | f'and was born in {row["birthday month"]}.') 12 | line_count += 1 13 | print(f'Processed {line_count} lines.') 14 | -------------------------------------------------------------------------------- /chapter01/read_file_geneator.py: -------------------------------------------------------------------------------- 1 | def read_file(file_name): 2 | """Read the file line by line.""" 3 | fread = open(file_name, "r") 4 | data = [line for line in fread if line.startswith(">>")] 5 | return data 6 | -------------------------------------------------------------------------------- /chapter01/read_file_using_iterator.py: -------------------------------------------------------------------------------- 1 | def read_file(file_name): 2 | """Read the file line by line.""" 3 | with open(file_name) as fread: 4 | for line in fread: 5 | yield line 6 | 7 | 8 | for line in read_file("logfile.txt"): 9 | print(line.startswith(">>") -------------------------------------------------------------------------------- /chapter01/single_level_docstring.py: -------------------------------------------------------------------------------- 1 | class Student: 2 | """This class handle actions performed by a student.""" 3 | 4 | def __init__(self): 5 | pass 6 | -------------------------------------------------------------------------------- /chapter01/sort_dictionary.py: -------------------------------------------------------------------------------- 1 | users = [ 2 | {"first_name": "Helen", "age": 39}, 3 | {"first_name": "Buck", "age": 10}, 4 | {"name": "anni", "age": 9} 5 | ] 6 | 7 | 8 | def get_user_name(users): 9 | """Get name of the user in lower case""" 10 | return users["first_name"].lower() 11 | 12 | def get_sorted_dictionary(users): 13 | """Sort the nested dictionary""" 14 | if not isinstance(users, dict): 15 | raise ValueError("Not a correct dictionary") 16 | if not len(users): 17 | raise ValueError("Empty dictionary") 18 | 19 | users_by_name = sorted(users, key=get_user_name) 20 | return users_by_name 21 | -------------------------------------------------------------------------------- /chapter01/use_join.py: -------------------------------------------------------------------------------- 1 | first_name = "Json" 2 | last_name = "smart" 3 | 4 | # Not a recommended way to concatenate string 5 | full_name = first_name + " " + last_name 6 | 7 | # More performant and improve readability 8 | " ".join([first_name, last_name]) 9 | -------------------------------------------------------------------------------- /chapter01/use_of_finally.py: -------------------------------------------------------------------------------- 1 | def write_file(file_name): 2 | """Read given file line by line"""" 3 | myfile = open(file_name, "w") 4 | try: 5 | myfile.write("Python is awesome") # Raise TypeError 6 | finally: 7 | myfile.close() # Executed before TypeError propagated 8 | -------------------------------------------------------------------------------- /chapter02/access_db_iterator.py: -------------------------------------------------------------------------------- 1 | def get_all_users_age(): 2 | all_users = 1000000000 3 | for id in all_users: 4 | user_obj = access_db_to_get_users_by_id(id) 5 | yield user.name, user.age 6 | 7 | for user_name, user_age in get_all_users_age(): 8 | print(user_name, user_age) 9 | -------------------------------------------------------------------------------- /chapter02/counter.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | contries = ["Belarus", "Albania", "Malta", "Ukrain", "Belarus", "Malta", "Kosove", "Belarus"] 4 | Counter(contries) 5 | """ 6 | >>> Counter({'Belarus': 2, 'Albania': 1, 'Malta': 2, 'Ukrain': 1, 'Kosove': 1}) 7 | """ 8 | -------------------------------------------------------------------------------- /chapter02/default_dict.py: -------------------------------------------------------------------------------- 1 | from collections import defaultdict 2 | 3 | # Make a defaultdict 4 | colors = defaultdict(int) 5 | 6 | # Try printing value of non-existing key would give us default values 7 | colors["orange"] 8 | # >>> 0 9 | 10 | print(colors) 11 | # >>> defaultdict(int, {"orange": 0}) 12 | -------------------------------------------------------------------------------- /chapter02/defaultdict_example.py: -------------------------------------------------------------------------------- 1 | from collections import defaultdict 2 | 3 | # Make a defaultdict 4 | langauge_found = defaultdict(int) 5 | 6 | # Try printing value of non-existing key 7 | langauge_found["golang"] 8 | # >>> 0 9 | -------------------------------------------------------------------------------- /chapter02/deque.py: -------------------------------------------------------------------------------- 1 | from collections import deque 2 | 3 | # Make a deque 4 | deq = deque("abcdefg") 5 | 6 | # Iterate over the deque's element 7 | [item.upper() for item in deq] 8 | # >>> deque(["A", "B", "C", "D", "E", "F", "G"]) 9 | 10 | # Add a new entry to right side 11 | deq.append("h") 12 | # >>> deque(["A", "B", "C", "D", "E", "F", "G", "h"]) 13 | 14 | # Add an new entry to the left side 15 | deq.appendleft("I") 16 | # >>> deque(["I", "A", "B", "C", "D", "E", "F", "G", "h"]) 17 | 18 | # Remove right most element 19 | deq.pop() 20 | # >>> "h" 21 | 22 | # Remove leftmost element 23 | deq.popleft() 24 | # >>> "I" 25 | 26 | # empty deque 27 | deq.clear() 28 | -------------------------------------------------------------------------------- /chapter02/iter_as_prime_number.py: -------------------------------------------------------------------------------- 1 | def is_prime(num): 2 | for item in range(2, int(math.sqrt(num)) + 1): 3 | if num % item == 0: 4 | prime = False 5 | return prime 6 | 7 | def get_prime_numbers(lower, higher): 8 | for possible_prime in range(lower, higher): 9 | if is_prime(possible_prime): 10 | yield possible_prime 11 | yield False 12 | 13 | for prime in get_prime_numbers(lower, higher): 14 | if prime: 15 | print(prime) 16 | -------------------------------------------------------------------------------- /chapter02/json_pretty_printing.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | data = {'a':12, 'b':{'x':87, 'y':{'t1': 21, 't2':34}} 4 | json.dumps(data, sort_keys=True, indent=4) 5 | -------------------------------------------------------------------------------- /chapter02/list_as_prime_number.py: -------------------------------------------------------------------------------- 1 | def get_prime_numbers(lower, higher): 2 | primes = [] 3 | for num in range(lower, higher + 1): 4 | for prime in range(2, num + 1): 5 | is_prime = True 6 | for item in range(2, int(num ** 0.5) + 1): 7 | if num % item == 0: 8 | is_prime = False 9 | break 10 | 11 | if is_prime: 12 | primes.append(num) 13 | print(get_prime_numbers(30, 30000)) 14 | -------------------------------------------------------------------------------- /chapter02/merge_two_dict.py: -------------------------------------------------------------------------------- 1 | salary_first = {"Lisa": 238900, "Ganesh": 8765000, "John": 3450000} 2 | salary_second = {"Albert": 3456000, "Arya": 987600} 3 | salary = salary_first.copy() 4 | salary.update(salary_second) 5 | # >>> {"Lisa": 238900, "Ganesh": 8765000, "John": 345000, "Albert": 3456000, "Ary": 987600} 6 | -------------------------------------------------------------------------------- /chapter02/most_count.py: -------------------------------------------------------------------------------- 1 | from collections import Counter 2 | 3 | contries = ["Belarus", "Albania", "Malta", "Ukrain", "Belarus", "Malta", "Kosove", "Belarus"] 4 | contries_count = Counter(contries) 5 | """ 6 | >>> Counter({'Belarus': 2, 'Albania': 1, 'Malta': 2, 'Ukrain': 1, 'Kosove': 1}) 7 | """ 8 | contries_count.most_common(1) 9 | """ 10 | >>> [('Belarus', 3)] 11 | """ 12 | -------------------------------------------------------------------------------- /chapter02/namedtuple_example.py: -------------------------------------------------------------------------------- 1 | 2 | from collections import namedtuple 3 | 4 | # Make a namedtuple 5 | Company = namedtuple("Company", ["name", "employee", "location"]) 6 | 7 | # Assing values 8 | company = Company("google", 50000, "MountainView") 9 | 10 | # Get values 11 | company.name 12 | #>>> google 13 | company.employee 14 | #>>> 50000 15 | company.location 16 | #>>> MountainView 17 | -------------------------------------------------------------------------------- /chapter02/orderdict_example.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | # Make a OrderedDict 4 | colors = OrderedDict() 5 | 6 | # Assing values 7 | colors["orange"] = "ORANGE" 8 | colors["blue"] = "BLUE" 9 | colors["green"] = "GREEN" 10 | 11 | # Get values 12 | [k for k, v in colors.items()] 13 | # >>> ["orange", "blue", "green"] 14 | -------------------------------------------------------------------------------- /chapter02/pretty_print.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | 3 | pp = pprint.PrettyPrinter(indent=4) 4 | pp.pprint(colors) 5 | -------------------------------------------------------------------------------- /chapter02/return_as_namedtuple.py: -------------------------------------------------------------------------------- 1 | 2 | def get_user_info(user_obj): 3 | user = get_data_from_db(user_obj) 4 | UserInfo = namedtuple(“UserInfo”, [“first_name”, “last_name”, “age”]) 5 | 6 | user_info = UserInfo(first_name=user[“first_name”], 7 | last_name=user[“last_name”], 8 | age=user[“age”]) 9 | 10 | return user_info 11 | 12 | def get_full_name(user_info): 13 | return user_info.first_name + user_info.last_name 14 | 15 | user_info = get_user_info(user_obj) 16 | full_name = get_full_name(user_info) 17 | -------------------------------------------------------------------------------- /chapter02/return_as_tuple.py: -------------------------------------------------------------------------------- 1 | def get_user_info(user_obj): 2 | user = get_data_from_db(user_obj) 3 | first_name = user["first_name"] 4 | last_name = user["last_name"] 5 | age = user["age"] 6 | return (first_name, last_name, age) 7 | 8 | 9 | def get_full_name(first_name, last_name): 10 | return first_name + last_name 11 | 12 | first_name, last_name, age = get_user_info(user_obj) 13 | full_name = get_full_name(first_name, last_name) 14 | -------------------------------------------------------------------------------- /chapter02/simple_namedtuple.py: -------------------------------------------------------------------------------- 1 | import namedtuple 2 | 3 | 4 | Point = namedtuple("Point", ["x", "y", "z"]) 5 | point = Point(x=3, y=4, z=5) 6 | point.x 7 | point.y 8 | point.z 9 | -------------------------------------------------------------------------------- /chapter02/store_db_result_in_list.py: -------------------------------------------------------------------------------- 1 | def get_all_users_age(total_users=1000): 2 | age = [] 3 | for id in total_users: 4 | user_obj = access_db_to_get_users_by_id(id) 5 | age.append([user.name, user.age]) 6 | return age 7 | 8 | total_users = 1000000000 9 | for user_info in range(total_users): 10 | info = get_all_users_age() 11 | for user in info: 12 | print(user) 13 | -------------------------------------------------------------------------------- /chapter02/switch_using_dict.py: -------------------------------------------------------------------------------- 1 | # Example to show, how switch can be implimented, not working example. 2 | def tanzania(amount): 3 | calculate_tax = 4 | return calculate_tax 5 | 6 | def zambia(amount): 7 | calculate_tax = 8 | return calculate_tax 9 | 10 | def eritrea(amount): 11 | calculate_tax = 12 | return calculate_tax 13 | 14 | 15 | contry_tax_calculate = { 16 | "tanzania": tanzania, 17 | "zambia": zambia, 18 | "eritrea": eritrea, 19 | } 20 | 21 | def calculate_tax(country_name, amount): 22 | country_tax_calculate["contry_name"](amount) 23 | 24 | 25 | calculate_tax("zambia", 8000000) 26 | -------------------------------------------------------------------------------- /chapter02/use_zip_for_list.py: -------------------------------------------------------------------------------- 1 | def get_user_salary_info(): 2 | users = get_users_name_from_db() 3 | # ["Abe", "Larry", "Adams", "John", "Sumit", "Adward"] 4 | 5 | users_salary = get_users_salary_from_db() 6 | # ["2M", "1M", "60K", "30K", "80K", "100K"] 7 | 8 | users_salary = [] 9 | for index in len(users): 10 | users_salary.append([users[index], users_salary[index]]) 11 | 12 | return users_salary 13 | 14 | -------------------------------------------------------------------------------- /chapter02/use_zip_to_process_lists.py: -------------------------------------------------------------------------------- 1 | def get_user_salary_info(): 2 | users = get_users_name_from_db() 3 | # ["Abe", "Larry", "Adams", "John", "Sumit", "Adward"] 4 | 5 | users_salary = get_users_salary_from_db() 6 | # ["2M", "1M", "60K", "30K", "80K", "100K"] 7 | 8 | users_salary = [] 9 | for usr, slr in zip(users, users_salary): 10 | users_salary.append(usr, slr) 11 | 12 | return users_salary 13 | -------------------------------------------------------------------------------- /chapter02/using_list_to_combine_list.py: -------------------------------------------------------------------------------- 1 | def get_user_salary_info(): 2 | users = get_users_name_from_db() 3 | # ["Abe", "Larry", "Adams", "John", "Sumit", "Adward"] 4 | 5 | users_salary = get_users_salary_from_db() 6 | # ["2M", "1M", "60K", "30K", "80K", "100K"] 7 | 8 | users_salary = [] 9 | for index in len(users): 10 | users_salary.append([users[index], users_salary[index]]) 11 | 12 | return users_salary 13 | 14 | -------------------------------------------------------------------------------- /chapter03/dont_return_none.py: -------------------------------------------------------------------------------- 1 | def read_lines_for_python(file_name, file_type): 2 | if not file_name or file_type not in ("txt", "html"): 3 | return None 4 | 5 | lines = [] 6 | with open(file_name, "r") as fileread: 7 | for line in fileread: 8 | if "python" in line: 9 | return "Found Python" 10 | 11 | 12 | if not read_lines_for_python("file_without_python_name", "pdf"): 13 | print("Not correct file format or file name doesn't exist") 14 | -------------------------------------------------------------------------------- /chapter03/exception_instead_of_return.py: -------------------------------------------------------------------------------- 1 | def sum(first_number, second_number): 2 | if isinstance(first_number, int) and isinstance(second_number, int): 3 | return first_number + second_number 4 | else: 5 | raise ValueError("Provide only int values") 6 | -------------------------------------------------------------------------------- /chapter03/logging_example.py: -------------------------------------------------------------------------------- 1 | # Import logging module 2 | Import logging 3 | 4 | logger = logging.getLogger(__name__) # Create a custom logger 5 | handler = logging.StreamHandler # Using stream handler 6 | 7 | # Set logging levels 8 | handler.setLevel(logging.WARNING) 9 | handler.setLevel(logging.ERROR) 10 | 11 | format_c = logging.Formatter("%(name) - %(levelname) - %(message)") 12 | handler.setFromatter(format_c) # Add formater to handler 13 | logger.addHandler(handler) 14 | 15 | def division(divident, divisor): 16 | try: 17 | return divident/divisor 18 | catch ZeroDivisionError: 19 | logger.error("Zero Division Error") 20 | 21 | num = divison(4, 0) 22 | -------------------------------------------------------------------------------- /chapter03/misuse_of_lambda.py: -------------------------------------------------------------------------------- 1 | import re 2 | data = [abc0, abc9, abc5, cba 2] 3 | convert = lambda text: float(text) if text.isdigit() else text 4 | alphanum = lambda key: [convert(c) for c in re.split('([-+]?[0-9]*\.?[0-9]*)', key) ] 5 | data.sort( key=alphanum ) 6 | -------------------------------------------------------------------------------- /chapter03/private_variable.py: -------------------------------------------------------------------------------- 1 | class Person: 2 | 3 | def __init__(self, first_name, last_name): 4 | self._full_name = f"${first_name} ${last_name}" 5 | 6 | def get_name(self): 7 | return self._full_name 8 | 9 | per = Person("Larry", "Page") 10 | assert per.get_name() == "Larry Page" 11 | -------------------------------------------------------------------------------- /chapter03/raising_exception_instead_of_none.py: -------------------------------------------------------------------------------- 1 | def read_lines_for_python(file_name, file_type): 2 | if file_type not in ("txt", "html"): 3 | raise ValueError("Not correct file format") 4 | if not file_name: 5 | raise IOError("File Not Found") 6 | 7 | with open(file_name, "r") as fileread: 8 | for line in fileread: 9 | if "python" in line: 10 | return "Found Python" 11 | 12 | 13 | if not read_lines_for_python("file_without_python_name", "pdf"): 14 | print("Python keyword doesn't exists in file") 15 | 16 | # Result: >> ValueError("Not correct file format") 17 | -------------------------------------------------------------------------------- /chapter03/raising_specific_exception.py: -------------------------------------------------------------------------------- 1 | def get_file_name(file_name, file_type): 2 | if not file_name: 3 | raise ValueError("File name not found", file_type) 4 | return file_name, file_type 5 | 6 | try: 7 | get_file_name('', txt) 8 | except ValueError as err: 9 | print(err.args) 10 | -------------------------------------------------------------------------------- /chapter03/read_unique_email.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | 4 | def get_unique_emails(file_name): 5 | """ 6 | Get all unique emails. 7 | """ 8 | emails = set() 9 | for line in read_file(file_name): 10 | match = re.findall(r'[\w\.-]+@[\w\.-]+', line) 11 | for email in match: 12 | emails.add(email) 13 | return emails 14 | 15 | 16 | def read_file(file_name): 17 | """ 18 | Read file and yield each line. 19 | """ 20 | with open(file_name) as fread: 21 | for line in fread: 22 | yield line 23 | -------------------------------------------------------------------------------- /chapter03/return_non_none_explicitly.py: -------------------------------------------------------------------------------- 1 | def find_first_odd_number(numbers): 2 | odd_numbers = [] 3 | if isinstance(numbers, list): 4 | raise ValueError("Only accept list, wrong data type") 5 | for item in numbers: 6 | if item % 2 != 0: 7 | odd_numbers.append(item) 8 | return odd_numbers 9 | 10 | num = find_first_odd_number([2, 4, 6, 7, 8, 10]) # return 7 11 | num = find_first_odd_number((2, 4, 6, 7, 8, 10)) # Raise ValueError exception 12 | num = find_first_odd_number([2, 4, 6, 8, 10]) # return [] 13 | -------------------------------------------------------------------------------- /chapter03/return_none_explicitly.py: -------------------------------------------------------------------------------- 1 | def sum(first_number, second_number): 2 | if isinstance(first_number, int) and isinstance(second_number, int): 3 | return first_number + second_number 4 | else: 5 | return None 6 | 7 | 8 | result = sum(10, "str") # Return None 9 | result = sum(10, 5) # Return 15 10 | -------------------------------------------------------------------------------- /chapter03/return_none_explicitly_bad_code.py: -------------------------------------------------------------------------------- 1 | def find_odd_number(numbers): 2 | odd_numbers = [] 3 | if isinstance(numbers, list): 4 | return None 5 | for item in numbers: 6 | if item % 2 != 0: 7 | odd_numbers.append(item) 8 | return odd_numbers 9 | 10 | 11 | num = find_odd_number([2, 4, 6, 7, 8, 10]) # return 7 12 | num = find_odd_number((2, 4, 6, 7, 8, 10)) # return None 13 | num = find_odd_number([2, 4, 6, 8, 10]) # return [] 14 | -------------------------------------------------------------------------------- /chapter03/return_none_explicitly_one_more_way.py: -------------------------------------------------------------------------------- 1 | def find_odd_number(numbers): 2 | odd_numbers = [] 3 | if isinstance(numbers, list): 4 | return None 5 | for item in numbers: 6 | if item % 2 != 0: 7 | odd_numbers.append(item) 8 | return odd_numbers 9 | 10 | 11 | num = find_odd_number([2, 4, 6, 7, 8, 10]) # return 7 12 | num = find_odd_number((2, 4, 6, 7, 8, 10)) # return None 13 | num = find_odd_number([2, 4, 6, 8, 10]) # return [] 14 | -------------------------------------------------------------------------------- /chapter03/right_way_use_abstract.py: -------------------------------------------------------------------------------- 1 | from abc import ABCMeta, abstractmethod 2 | 3 | class Fruite(metaclass=ABCMeta): 4 | 5 | @abstractmethod 6 | def taste(self): 7 | pass 8 | 9 | @abstractmethod 10 | def originated(self): 11 | pass 12 | 13 | 14 | class Apple: 15 | def originated(self): 16 | return "Central Asia" 17 | 18 | 19 | fruite = Fruite("apple") 20 | """ 21 | TypeError: 22 | "Can't instantiate abstract class concrte with abstract method taste" 23 | """ 24 | -------------------------------------------------------------------------------- /chapter03/set_get_using_property.py: -------------------------------------------------------------------------------- 1 | class Temprature: 2 | def __init__(self, temprature=0): 3 | self.temprature = temprature 4 | 5 | @property 6 | def fahrenheit(self): 7 | return self._temprature 8 | 9 | @fahrenheit.setter 10 | def fahrenheit(self, temp): 11 | if not isinstance(temp, int): 12 | raise("Wrong input type") 13 | 14 | self._temprature = (self.temp * 1.8) + 32 15 | -------------------------------------------------------------------------------- /chapter03/small_function.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | 4 | def get_unique_emails(file_name): 5 | """ 6 | Get all unique emails. 7 | """ 8 | for line in read_file(file_name): 9 | match = re.findall(r'[\w\.-]+@[\w\.-]+', line) 10 | for email in match: 11 | yield email 12 | 13 | 14 | def read_file(file_name): 15 | """ 16 | Read file and yield each line. 17 | """ 18 | with open(file_name) as fread: 19 | for line in fread: 20 | yield line 21 | 22 | def print_email_list(): 23 | """ 24 | Print list of emails 25 | """ 26 | for email in get_unique_emails('duplicate_emails'): 27 | print(email) 28 | -------------------------------------------------------------------------------- /chapter03/use_class_method_for_serialization.py: -------------------------------------------------------------------------------- 1 | class User: 2 | 3 | def __init__(self, first_name, last_name): 4 | self.first_name = first_name 5 | self.last_name = last_name 6 | 7 | @classmethod 8 | def using_string(cls, names_str): 9 | first, second = map(str, names_str.split("")) 10 | student = cls(first, second) 11 | return Student 12 | 13 | @classmethod 14 | def using_json(cls, obj_json): 15 | # Parsing json object… 16 | return Student 17 | 18 | @classmethod 19 | def using_file_obj(cls, file_obj): 20 | # Parsing file object… 21 | return Student 22 | 23 | 24 | data = User.using_string("Larry Page") 25 | data = User.using_json(json_obj) 26 | data = User.using_file_obj(file_obj) 27 | -------------------------------------------------------------------------------- /chapter03/use_default_arg.py: -------------------------------------------------------------------------------- 1 | def calculate_sum(first_number=5, second_number=10): 2 | return first_number + second_number 3 | 4 | calculate_sum() 5 | calculate_sum(50) 6 | calculate_sum(90, 10) 7 | -------------------------------------------------------------------------------- /chapter03/use_property.py: -------------------------------------------------------------------------------- 1 | class Temprature: 2 | def __init__(self, temprature=0): 3 | self.temprature = temprature 4 | 5 | @property 6 | def fahrenheit(self): 7 | self.temprature = (self.temprature * 1.8) + 32 8 | 9 | temp = Temprature(10) 10 | temp.fahrenheit 11 | print(temp.temprature) 12 | -------------------------------------------------------------------------------- /chapter03/using_dunter_for_inheritence.py: -------------------------------------------------------------------------------- 1 | class Person: 2 | def __init__(self, first_name, last_name): 3 | self.age = 50 4 | 5 | def get_name(self): 6 | return self.full_name 7 | 8 | 9 | class Child(Person): 10 | def __init__(self): 11 | super().__init__() 12 | self.__age = 20 13 | 14 | 15 | ch = Child() 16 | print(ch.get()) # 50 17 | print(ch.__age) # 30 -------------------------------------------------------------------------------- /chapter03/with_static_use.py: -------------------------------------------------------------------------------- 1 | class BookPriceCalculator: 2 | PER_PAGE_PRICE = 8 3 | 4 | def __init__(self, pages, author): 5 | self.pages = pages 6 | self.author = author 7 | 8 | @property 9 | def standard_price(self): 10 | return self.pages * PER_PAGE_PRICE 11 | 12 | 13 | @staticmethod 14 | def price_to_book_ratio(market_price_per_share, book_value_per_share): 15 | return market_price_per_share/book_value_per_share 16 | -------------------------------------------------------------------------------- /chapter03/without_static.py: -------------------------------------------------------------------------------- 1 | def price_to_book_ratio(market_price_per_share, book_value_per_share): 2 | return market_price_per_share/book_value_per_share 3 | 4 | class BookPriceCalculator: 5 | PER_PAGE_PRICE = 8 6 | 7 | def __init__(self, pages, author): 8 | self.pages = pages 9 | self.author = author 10 | 11 | @property 12 | def standard_price(self): 13 | return self.pages * PER_PAGE_PRICE 14 | -------------------------------------------------------------------------------- /chapter04/cache_using_call.py: -------------------------------------------------------------------------------- 1 | class Memo(type): 2 | def __init__(self, *args, **kwargs): 3 | super().__init__(*args, **kwargs) 4 | self.__cache = {} 5 | 6 | def __call__(self, _id, *args, **kwargs): 7 | if _id not in self.__cache: 8 | self.cache[_id] = super().__call__(_id, *args, **kwargs) 9 | else: 10 | print("Existing Instance") 11 | return self.__cache[id] 12 | 13 | 14 | class Foo(Memo): 15 | def __init__(self, _id, *args, **kwargs): 16 | self.id = _id 17 | 18 | 19 | 20 | def test(): 21 | first = Foo(id="first") 22 | second = Foo(id="first") 23 | print(id(first) == id(second)) 24 | 25 | test() # True 26 | -------------------------------------------------------------------------------- /chapter04/change_class_behaviour_using_metaclass.py: -------------------------------------------------------------------------------- 1 | class NoClassInstance: 2 | """Create the user object.""" 3 | def __call__(self, *args, **kwargs): 4 | raise TypeError("Can't instantiate directly""") 5 | 6 | 7 | class User(metaclass=NoClassInstance): 8 | 9 | @staticmethod 10 | def print_name(name): 11 | """print name of the provided value.""" 12 | print(f"Name: {name}") 13 | 14 | 15 | user = User() 16 | # TypeError: Can't instantiate directly 17 | User.print_name("Larry Page") 18 | # Name: Larry Page 19 | -------------------------------------------------------------------------------- /chapter04/iterator_class.py: -------------------------------------------------------------------------------- 1 | class MutipleByTwo: 2 | def __init__(self, number): 3 | self.number = number 4 | self.count = 0 5 | 6 | def __next__(self): 7 | self.counter += 1 8 | return self.number * self.counter 9 | 10 | mul = Mutiple(500) 11 | print(next(mul)) # 500 12 | print(next(mul)) # 1000 13 | print(next(mul)) # 1500 14 | -------------------------------------------------------------------------------- /chapter04/metaclass_example.py: -------------------------------------------------------------------------------- 1 | def awesome_attr(future_class_name, future_class_parents, future_class_attr): 2 | """ 3 | Return a class object, with the list of its attribute prefix with awesome keyword. 4 | """ 5 | # pick any attribute that doesn't start with '__' and prefix with awesome 6 | awesome_prefix = {} 7 | for name, val in future_class_attr.items(): 8 | if not name.startswith('__'): 9 | uppercase_attr["_".join("awesome", name)] = val 10 | else: 11 | uppercase_attr[name] = val 12 | 13 | # let `type` do the class creation 14 | return type(future_class_name, future_class_parents, uppercase_attr) 15 | 16 | 17 | __metaclass__ = uppercase_attr # this will affect all classes in the module 18 | 19 | 20 | class Example: # global __metaclass__ won't work with "object" though 21 | # but we can define __metaclass__ here instead to affect only this class 22 | # and this will work with "object" children 23 | val = 'yes' 24 | -------------------------------------------------------------------------------- /chapter04/new_keyword_use.py: -------------------------------------------------------------------------------- 1 | from abc import abstractmethod, ABCMeta 2 | 3 | class UserAbstract(metaclass=ABCMeta): 4 | """Abstract base class template, implimenting factory pattern using __new__() initializer.""" 5 | 6 | def __new__(cls, *args, **kwargs): 7 | """Creates an object instance a sets a base property.""" 8 | obj = object.__new__(cls) 9 | obj.base_property = "Adding Property for each subclass" 10 | return obj 11 | 12 | 13 | class User(UserAbstract): 14 | """Implement UserAbstract class and add its own variable.""" 15 | 16 | def __init__(self): 17 | self.name = "Larry" 18 | 19 | 20 | user = User() 21 | user.name 22 | # Larry 23 | user.base_property 24 | # Adding Property for each subclass 25 | -------------------------------------------------------------------------------- /chapter04/slots_use.py: -------------------------------------------------------------------------------- 1 | class WithSlots: 2 | """Using __slots__ magic here.""" 3 | __slots__ = "foo" 4 | 5 | 6 | class WithoutSlots: 7 | """Not using __slots__ here.""" 8 | pass 9 | 10 | 11 | with_slots = WithSlots() 12 | without_slots = WithoutSlots() 13 | 14 | 15 | with_slots.foo = "Foo" 16 | without_slots.foo = "Foo" 17 | 18 | 19 | """ 20 | >> %timeit with_slots.foo 21 | 44.5 ns 22 | >> %timeit without_slots.foo 23 | 54.5 ns 24 | """ 25 | -------------------------------------------------------------------------------- /chapter04/use_call_for_api.py: -------------------------------------------------------------------------------- 1 | class Calculation: 2 | """ 3 | A wrapper around the different calculation algorithms that allows to perform different action on two numbers. 4 | """ 5 | def __init__(self, operation): 6 | self.operation = operation 7 | 8 | def __call__(self, first_number, second_number): 9 | if isinstance(first_number, int) and isinstance(second_number, int): 10 | return self.operation() 11 | raise ValueError("Provide numbers") 12 | 13 | 14 | 15 | def add(self, first, second): 16 | return first + second 17 | 18 | def multiply(self, first, second): 19 | return first * second 20 | 21 | 22 | add = Calculation(add) 23 | print(add(5, 4)) # 9 24 | multiply = Calculation(multiply) 25 | print(multiply(5, 4)) # 20 26 | -------------------------------------------------------------------------------- /chapter04/use_get_as_descripter.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | 4 | class Dice: 5 | """Dice class to perform dice operations.""" 6 | def __init__(self, sides=6): 7 | self.sides = sides 8 | 9 | def __get__(self, instance, owner): 10 | return int(random.random() * self.slides) + 1 11 | 12 | def __set__(self, instance, value): 13 | print(f"New assigned value: ${value}") 14 | if not isinstance(instance.sides, int): 15 | raise ValueError("Provide integer") 16 | instance.sides = value 17 | 18 | 19 | class Play: 20 | d6 = Dice() 21 | d10 = Dice(10) 22 | d13 = Dice(13) 23 | 24 | 25 | play = Play() 26 | play.d6 # 3 27 | play.d10 # 4 28 | play.d6 = 11 # New assigned value: 11 29 | -------------------------------------------------------------------------------- /chapter04/use_new_for_validation.py: -------------------------------------------------------------------------------- 1 | from abc import abstractmethod, ABCMeta 2 | 3 | 4 | class UserAbstract(metaclass=ABCMeta): 5 | """Abstract base class template, implimenting factory pattern using __new__() initializer.""" 6 | 7 | def __new__(cls, *args, **kwargs): 8 | """Creates an object instance a sets a base property.""" 9 | obj = object.__new__(cls) 10 | given_data = args[0] 11 | # Validating the data here 12 | if not isinstance(given_data, str): 13 | raise ValueError(f"Please provide string: {given_data}") 14 | return obj 15 | 16 | 17 | class User(UserAbstract): 18 | """Implement UserAbstract class and add its own variable.""" 19 | 20 | def __init__(self, name): 21 | self.name = name 22 | 23 | 24 | user = User(10) 25 | # ValueError: Please provide string: 10 26 | -------------------------------------------------------------------------------- /chapter05/context_manager_for_context_manager.py: -------------------------------------------------------------------------------- 1 | from contextlib import contextmanager 2 | 3 | 4 | @contextmanager 5 | def write_file(file_name): 6 | try: 7 | fread = open(file_name, "w") 8 | yield fread 9 | finally: 10 | fread.close() 11 | 12 | 13 | with read_file("accounts.txt") as f: 14 | f.write("Hello, how you are doing") 15 | f.write("Writing into file") 16 | -------------------------------------------------------------------------------- /chapter05/context_with_file_read.py: -------------------------------------------------------------------------------- 1 | with open("temp.txt") as fread: 2 | for line in fread: 3 | print(f"Line: {line}") 4 | -------------------------------------------------------------------------------- /chapter05/decorator_example.py: -------------------------------------------------------------------------------- 1 | def to_upper_case(func): 2 | """Convert to upper case and return to upper case.""" 3 | 4 | # Adding this line, will call passed function to get text 5 | text = func() 6 | 7 | if not isinstance(text, str): 8 | raise TypeError("Not a string type") 9 | return text.upper() 10 | 11 | 12 | @to_upper_case 13 | def say(): 14 | return "welcome" 15 | 16 | say() # WELCOME 17 | -------------------------------------------------------------------------------- /chapter05/decorator_example_2.py: -------------------------------------------------------------------------------- 1 | def to_upper_case(func): 2 | def wrapper(): 3 | text = func() 4 | if not isinstance(text, str): 5 | raise TypeError("Not a string type") 6 | return text.upper() 7 | return wrapper 8 | 9 | 10 | @to_upper_case 11 | def say(): 12 | return "welcome" 13 | 14 | 15 | @to_upper_case 16 | def hello(): 17 | return "hello" 18 | 19 | 20 | say() # WELCOME 21 | hello() # HELLO 22 | -------------------------------------------------------------------------------- /chapter05/decorators_with_arguments.py: -------------------------------------------------------------------------------- 1 | def to_upper_case(func): 2 | def wrapper(*args, **kwargs): 3 | text = func(*args, **kwargs) 4 | if not isinstance(text, str): 5 | raise TypeError("Not a string type") 6 | return text.upper() 7 | return wrapper 8 | 9 | 10 | @to_upper_case 11 | def say(greet): 12 | return greet 13 | 14 | 15 | say("hello, how you doing") # 'HELLO, HOW YOU DOING' 16 | -------------------------------------------------------------------------------- /chapter05/define_context_manager.py: -------------------------------------------------------------------------------- 1 | class ReadFile: 2 | def __init__(self, name): 3 | self.name = name 4 | 5 | def __enter__(self ): 6 | self.file = open(self.name, 'w') 7 | return self 8 | 9 | def __exit__(self, exc_type, exc_val, exc_tb): 10 | if self.file: 11 | self.file.close() 12 | 13 | 14 | file_name = "test.txt" 15 | 16 | 17 | with ReadFile(file_name) as fread: 18 | fread.write("Learning context manager") 19 | fread.write("Writing into file") 20 | -------------------------------------------------------------------------------- /chapter05/functool_for_decorator.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | 3 | 4 | def logging(func): 5 | @wraps(func) 6 | def logs(*args, **kwargs): 7 | print(func.__name__ + " was called") 8 | return func(*args, **kwargs) 9 | return logs 10 | 11 | 12 | @logging 13 | def foo(x): 14 | """does some math""" 15 | return x + x * x 16 | 17 | 18 | print(foo.__name__) # prints 'f' 19 | print(foo.__doc__) # prints 'does some math' 20 | -------------------------------------------------------------------------------- /chapter05/lock_file_reading.py: -------------------------------------------------------------------------------- 1 | from filelock import FileLock 2 | 3 | def write_file(file_name): 4 | with FileLock(file_name): 5 | # work with the file as it is now locked 6 | print("Lock acquired.") 7 | -------------------------------------------------------------------------------- /chapter05/logging_decorator.py: -------------------------------------------------------------------------------- 1 | def logging(func): 2 | def logs(*args, **kwargs): 3 | print(func.__name__ + " was called") 4 | return func(*args, **kwargs) 5 | return logs 6 | 7 | 8 | @logging 9 | def foo(x): 10 | """Calling function for logging""" 11 | return x * x 12 | 13 | 14 | fo = foo(10) 15 | print(foo.__name__) # logs 16 | -------------------------------------------------------------------------------- /chapter05/multiple_decorators.py: -------------------------------------------------------------------------------- 1 | def add_prefix(func): 2 | def wrapper(): 3 | text = func() 4 | result = " ".join([text, "Larry Page!"]) 5 | return result 6 | return wrapper 7 | 8 | 9 | def to_upper_case(func): 10 | def wrapper(): 11 | text = func() 12 | if not isinstance(text, str): 13 | raise TypeError("Not a string type") 14 | return text.upper() 15 | return wrapper 16 | 17 | 18 | @to_upper_case 19 | @add_prefix 20 | def say(): 21 | return "welcome" 22 | 23 | 24 | say() # WELCOME LARRY PAGE! 25 | -------------------------------------------------------------------------------- /chapter05/remote_connection_context_manager.py: -------------------------------------------------------------------------------- 1 | class Protocol: 2 | def __init__(self, host, port): 3 | self.host, self.port = host, port 4 | 5 | def __enter__(self): 6 | self._client = socket() 7 | self._client.connect((self.host, self.port)) 8 | return self 9 | 10 | def __exit__(self, exception, value, traceback): 11 | self._client.close() 12 | 13 | def send(self, payload): 14 | 15 | 16 | def receive(self): 17 | 18 | 19 | 20 | with Protocol(host, port) as protocol: 21 | protocol.send(['get', signal]) 22 | result = protocol.receive() 23 | -------------------------------------------------------------------------------- /chapter05/testing_exception.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | def divide_numbers(first, second): 5 | if isinstance(first, int) and isinstance(second, int): 6 | raise ValueError("Value should be int") 7 | 8 | try: 9 | return first/second 10 | except ZeroDivisionError: 11 | print("Value should not be zero") 12 | raise 13 | 14 | 15 | def test_divide_numbers(): 16 | with pytest.raises(ValueError): 17 | divide_numbers("1", 2) 18 | -------------------------------------------------------------------------------- /chapter05/use_decorator_lib.py: -------------------------------------------------------------------------------- 1 | from decorator import decorator 2 | 3 | @decorator 4 | def trace(f, *args, **kw): 5 | kwstr = ', '.join('%r: %r' % (k, kw[k]) for k in sorted(kw)) 6 | print("calling %s with args %s, {%s}" % (f.__name__, args, kwstr)) 7 | return f(*args, **kw) 8 | 9 | @trace 10 | def func(): pass 11 | 12 | func() 13 | # calling func with args (), {} 14 | -------------------------------------------------------------------------------- /chapter05/use_lock.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | 3 | con = sqlite3.connect(":memory:") 4 | con.execute("create table person (id integer primary key, firstname varchar unique)") 5 | 6 | # Successful, con.commit() is called automatically afterwards 7 | with con: 8 | con.execute("insert into person(firstname) values (?)", ("Joe",)) 9 | 10 | # con.rollback() is called after the with block finishes with an exception, the 11 | # exception is still raised and must be caught 12 | try: 13 | with con: 14 | con.execute("insert into person(firstname) values (?)", ("Joe",)) 15 | except sqlite3.IntegrityError: 16 | print("couldn't add Joe twice") 17 | -------------------------------------------------------------------------------- /chapter05/using_func_as_parameter.py: -------------------------------------------------------------------------------- 1 | def to_upper_case(func): 2 | """Convert to upper case and return to upper case.""" 3 | 4 | # Adding this line, will call passed function to get text 5 | text = func() 6 | 7 | if not isinstance(text, str): 8 | raise TypeError("Not a string type") 9 | return text.upper() 10 | 11 | 12 | def say(): 13 | return "welcome" 14 | 15 | 16 | def hello(): 17 | return "hello" 18 | 19 | 20 | to_upper_case(say) # WELCOME 21 | 22 | to_upper_case(hello) # HELLO 23 | -------------------------------------------------------------------------------- /chapter05/without_context_manager_read_file.py: -------------------------------------------------------------------------------- 1 | def read_file(file_name): 2 | """Read given file and print lines.""" 3 | try: 4 | fread = open("temp.txt") 5 | for line in fread: 6 | print(f"Line: {line}") 7 | except IOError as error: 8 | print("Having issue while reading the file") 9 | raise 10 | -------------------------------------------------------------------------------- /chapter06/generator_example.py: -------------------------------------------------------------------------------- 1 | def multiple_generator(num, limit): 2 | counter = 1 3 | value = number * counter 4 | 5 | while value <= limit: 6 | yield value 7 | counter += 1 8 | value = number * counter 9 | 10 | for num in multiple_generator(500, 5000): 11 | print(num) 12 | -------------------------------------------------------------------------------- /chapter06/iterator_class.py: -------------------------------------------------------------------------------- 1 | class MutipleByTwo: 2 | def __init__(self, number): 3 | self.number = number 4 | self.count = 0 5 | 6 | def __next__(self): 7 | self.count += 1 8 | return self.number * self.count 9 | 10 | 11 | mul = MutipleByTwo(500) 12 | print(next(mul)) # 500 13 | print(next(mul)) # 1000 14 | print(next(mul)) # 1500 15 | -------------------------------------------------------------------------------- /chapter06/iterator_with_for_loop.py: -------------------------------------------------------------------------------- 1 | class MultipleByTwo: 2 | def __init__(self, num): 3 | self.num = num 4 | self.counter = 0 5 | 6 | def __iter__(self): 7 | return self 8 | 9 | def __next__(self): 10 | self.counter += 1 11 | return self.number * self.counter 12 | 13 | 14 | for num in MutlipleByTwo(500): 15 | print(num) 16 | -------------------------------------------------------------------------------- /chapter06/read_csv_file_using_list.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | data = [] 4 | sum_data = 0 5 | 6 | with open("numbers.csv", "r") as f: 7 | data.extend(list(csv.reader(f))) 8 | 9 | for row in data[1:]: 10 | sum_data += sum(map(int, row)) 11 | 12 | print(sum_data) 13 | -------------------------------------------------------------------------------- /chapter06/use_stopiteration.py: -------------------------------------------------------------------------------- 1 | class MultipleByTwo: 2 | def __init__(self, num, limit): 3 | self.num = num 4 | self.limit = limit 5 | self.counter = 0 6 | 7 | def __iter__(self): 8 | return self 9 | 10 | def __next__(self): 11 | self.counter += 1 12 | value = self.number * self.counter 13 | 14 | if value > self.limit: 15 | raise StopIteration 16 | else: 17 | return value 18 | 19 | 20 | for num in MutlipleByTwo(500, 5000): 21 | print(num) 22 | -------------------------------------------------------------------------------- /chapter06/using_generator.py: -------------------------------------------------------------------------------- 1 | def generate_numbers(limit): 2 | for item in range(limit): 3 | yield item*item 4 | print(f"Inside the yield: {item}") 5 | 6 | 7 | numbers = generate_numbers() # create a generator 8 | 9 | print(numbers) # numbers is an object! 10 | # 11 | 12 | for item in numbers: 13 | print(item) 14 | -------------------------------------------------------------------------------- /chapter06/yield_from_use.py: -------------------------------------------------------------------------------- 1 | def flat_list(iter_values): 2 | """flatten a multi list or something.""" 3 | for item in iter_values: 4 | if hasattr(item, '__iter__'): 5 | yield from flat_list(item) 6 | else: 7 | yield item 8 | 9 | print(list(flat_list([1, [2], [3, [4]]]))) 10 | # [1, 2, 3, 4] 11 | -------------------------------------------------------------------------------- /chapter07/async_comprehension.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def gen_power_two(limit): 5 | item = 0 6 | while item < limit: 7 | yield 2 ** item 8 | item += 1 9 | await asyncio.sleep(1) 10 | 11 | 12 | async def main(limit): 13 | gen = [item async for item in gen_power_two(limit)] 14 | return gen 15 | 16 | 17 | print(asyncio.run(main(5))) 18 | -------------------------------------------------------------------------------- /chapter07/async_generator.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def generator(limit): 5 | for item in range(limit): 6 | yield item 7 | await asyncio.sleep(1) 8 | 9 | 10 | async def main(): 11 | async for item in generator(10): 12 | print(item) 13 | 14 | 15 | asyncio.run(main()) 16 | -------------------------------------------------------------------------------- /chapter07/async_hello.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | async def hello(first_print, second_print): 4 | print(first_print) 5 | await asyncio.sleep(1) 6 | print(second_print) 7 | 8 | asyncio.run(hello("Welcome", "Good by")) 9 | # Welcome 10 | # Good by 11 | -------------------------------------------------------------------------------- /chapter07/async_timeout_use.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def long_time_taking_method(): 5 | await asyncio.sleep(4000) 6 | print("Completed the work") 7 | 8 | 9 | async def main(): 10 | try: 11 | await asyncio.wait_for(long_time_taking_method(), timeout=2) 12 | except asyncio.TimeoutError: 13 | print("Timeout occurred") 14 | 15 | 16 | asyncio.run(main()) 17 | -------------------------------------------------------------------------------- /chapter07/concurrent_run_tasks.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import time 3 | 4 | 5 | async def say_something(delay, words): 6 | print(f"Before: {words}") 7 | await asyncio.sleep(delay) 8 | print(f"After: {words}") 9 | 10 | 11 | async def main(): 12 | print(f"Starting Tasks: {time.strftime('%X')}") 13 | task1 = asyncio.create_task(say_something(1, "First task started")) 14 | task2 = asyncio.create_task(say_something(2, "Second task started")) 15 | 16 | await task1 17 | await task2 18 | 19 | print(f"Finished Tasks: {time.strftime('%X')}") 20 | 21 | 22 | asyncio.run(main()) 23 | 24 | """ 25 | Result: 26 | Starting Tasks: 11:43:56 27 | Before: First task started 28 | Before: Second task started 29 | After: First task started 30 | After: Second task started 31 | Finished Tasks: 11:43:58 32 | """ 33 | -------------------------------------------------------------------------------- /chapter07/gather_to_run_concurrently.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import time 3 | 4 | async def greetings(): 5 | print("Welcome") 6 | await asyncio.sleep(1) 7 | print("Good By") 8 | 9 | async def main(): 10 | await asyncio.gather(greetings(), greetings()) 11 | 12 | def say_greet(): 13 | start = time.perf_counter() 14 | asyncio.run(main()) 15 | elapsed = time.perf_counter() - start 16 | print(f"Total time elapsed: {elapsed}") 17 | 18 | asyncio.run(say_greet()) 19 | -------------------------------------------------------------------------------- /chapter07/multiple_task_to_run_using_curio_run.py: -------------------------------------------------------------------------------- 1 | import curio 2 | 3 | 4 | async def generate(limit): 5 | step = 0 6 | while step <= limit: 7 | await curio.sleep(1) 8 | step += 1 9 | 10 | 11 | async def say_hello(): 12 | print("Hello") 13 | await curio.sleep(1000) 14 | 15 | 16 | async def main(): 17 | hello_task = await curio.spawn(say_hello) 18 | await curio.sleep(3) 19 | 20 | gen_task = await curio.spawn(generate, 5) 21 | await gen_task.join() 22 | 23 | print("Welcome") 24 | await hello_task.join() 25 | print("Good by") 26 | 27 | 28 | if __name__ == '__main__': 29 | curio.run(main) 30 | -------------------------------------------------------------------------------- /chapter07/pathlib_example.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | path = pathlib.Path("error.txt") 4 | path.resolve() 5 | # PosixPath("/home/python/error.txt") 6 | 7 | path.resolve().parent == pathlib.Path.cwd() # False 8 | -------------------------------------------------------------------------------- /chapter07/run_simple_task.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def value(val): 5 | return val 6 | 7 | 8 | async def main(): 9 | # Creating a task to run concurrently 10 | # You can create as many task as possible here 11 | task = asyncio.create_task(value(89)) 12 | 13 | # This will simply wait for task to finish 14 | await task 15 | 16 | 17 | asyncio.run(main()) 18 | -------------------------------------------------------------------------------- /chapter07/run_two_tasks.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import time 3 | 4 | 5 | async def say_something(delay, words): 6 | print(f"Before: {words}") 7 | await asyncio.sleep(delay) 8 | print(f"After: {words}") 9 | 10 | 11 | async def main(): 12 | print(f"start: {time.strftime('%X')}") 13 | 14 | await say_something(1, "First task started.") 15 | await say_something(1, "Second ask started.") 16 | 17 | print(f"Finished: {time.strftime('%X')}") 18 | 19 | 20 | asyncio.run(main()) 21 | """ 22 | Result: 23 | start: 11:30:11 24 | Before: First task started. 25 | After: First task started. 26 | Before: Second ask started. 27 | After: Second ask started. 28 | Finished: 11:30:13 29 | """ -------------------------------------------------------------------------------- /chapter07/scheduling_tasks.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def mul(first, second): 5 | print(f"Calculating multiply of {first} and {second}") 6 | await asyncio.sleep(1) 7 | num_mul = first * second 8 | print(f"Multiply of {num_mul}") 9 | return num_mul 10 | 11 | 12 | async def sum(first, second): 13 | print(f"Calculating sum of {first} and {second}") 14 | await asyncio.sleep(1) 15 | num_sum = first + second 16 | print(f"Sum is {num_sum}") 17 | return num_sum 18 | 19 | 20 | async def main(first, second): 21 | sum_task = asyncio.create_task(sum(first, second)) 22 | mul_task = asyncio.create_task(sum(first, second)) 23 | await sum_task 24 | await mul_task 25 | 26 | 27 | asyncio.run(main(7, 8)) 28 | 29 | """ 30 | Result 31 | Calculating sum of 7 and 8 32 | Calculating sum of 7 and 8 33 | Sum is 15 34 | Sum is 15 35 | """ 36 | -------------------------------------------------------------------------------- /chapter07/simple_curio.py: -------------------------------------------------------------------------------- 1 | import curio 2 | 3 | async def generate(limit): 4 | step = 0 5 | while step <= limit: 6 | await curio.sleep(1) 7 | step += 1 8 | 9 | if __name__ == "__main__": 10 | curio.run(generate, 10) 11 | -------------------------------------------------------------------------------- /chapter07/trio_concurrent_tasks.py: -------------------------------------------------------------------------------- 1 | import trio 2 | 3 | 4 | async def is_odd(data): 5 | odd_even = [] 6 | for item in data: 7 | odd_even.append((item, "Even") if item % 2 == 0 else (item, "Odd")) 8 | await trio.sleep(1) 9 | return odd_even 10 | 11 | 12 | async def is_prime(data): 13 | primes = [] 14 | for item in data: 15 | if item <= 1: 16 | primes.append((item, "Not Prime")) 17 | if item <= 3: 18 | primes.append((item, "Prime")) 19 | if item % 2 == 0 or item % 3 == 0: 20 | primes.append((item, "Not Prime")) 21 | factor = 5 22 | while factor * factor <= item: 23 | if item % factor == 0 or item % (factor + 2) == 0: 24 | primes.append((item, "Not Prime")) 25 | factor += 6 26 | await trio.sleep(1) 27 | return primes 28 | 29 | 30 | async def main(data): 31 | print("Calculation has started!") 32 | async with trio.open_nursery() as nursery: 33 | nursery.start_soon(is_odd, data) 34 | nursery.start_soon(is_prime, data) 35 | 36 | trio.run(main, [3, 5, 10, 23, 90]) 37 | -------------------------------------------------------------------------------- /chapter07/trio_simple.py: -------------------------------------------------------------------------------- 1 | import trio 2 | 3 | 4 | async def greeting(): 5 | await trio.sleep(1) 6 | return "Welcome to Trio!" 7 | 8 | trio.run(greeting) 9 | 10 | # Welcome to Trio! 11 | -------------------------------------------------------------------------------- /chapter07/typing_simple_example.py: -------------------------------------------------------------------------------- 1 | def is_key_present(data: dict, key: str) -> bool: 2 | if key in data: 3 | return True 4 | else: 5 | return False 6 | -------------------------------------------------------------------------------- /chapter07/use_await.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | async def mult(first, second): 5 | print(f"Calculating multiply of {first} and {second}") 6 | await asyncio.sleep(1) 7 | num_mul = first * second 8 | print(f"Multiply of {num_mul}") 9 | return num_mul 10 | 11 | 12 | async def sum(first, second): 13 | print(f"Calculating sum of {first} and {second}") 14 | await asyncio.sleep(1) 15 | num_sum = first + second 16 | print(f"Sum is {num_sum}") 17 | return num_sum 18 | 19 | 20 | async def main(first, second): 21 | await sum(first, second) 22 | await mult(first, second) 23 | 24 | 25 | asyncio.run(main(7, 8)) 26 | 27 | """ 28 | Result 29 | Calculating sum of 7 and 8 30 | Sum is 15 31 | Calculating multiply of 7 and 8 32 | Multiply of 56 33 | """ -------------------------------------------------------------------------------- /chapter08/hypothesis_use_for_property_testing.py: -------------------------------------------------------------------------------- 1 | from hypothesis import given 2 | from hypothesis.strategies import text 3 | 4 | @given(text()) 5 | def test_decode_inverts_encode(s): 6 | assert decode(encode(s)) == s 7 | -------------------------------------------------------------------------------- /chapter08/logging.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | formatters: 3 | simple: 4 | format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' 5 | handlers: 6 | console: 7 | class: logging.StreamHandler 8 | level: DEBUG 9 | formatter: simple 10 | stream: ext://sys.stdout 11 | loggers: 12 | sampleLogger: 13 | level: DEBUG 14 | handlers: [console] 15 | propagate: no 16 | root: 17 | level: DEBUG 18 | handlers: [console] 19 | -------------------------------------------------------------------------------- /chapter08/logging_use.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from logging.config import dictConfig 3 | 4 | logging_config = dict( 5 | version=1, 6 | formatters={"f": {"format": "%(asctime)s %(name)-12s %(levelname)-8s %(message)s"}}, 7 | handlers={ 8 | "h": { 9 | "class": "logging.StreamHandler", 10 | "formatter": "f", 11 | "level": logging.DEBUG, 12 | } 13 | }, 14 | root={"handlers": ["h"], "level": logging.DEBUG}, 15 | ) 16 | 17 | dictConfig(logging_config) 18 | 19 | logger = logging.getLogger() 20 | logger.debug("This is debug logging") 21 | -------------------------------------------------------------------------------- /chapter08/pytest_example.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | def test_simple(): 4 | assert 2 == 2 5 | 6 | def test_tuple(): 7 | assert (1, 3, 4) == (1, 3, 4) 8 | -------------------------------------------------------------------------------- /chapter08/pytest_with_fixture.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | @pytest.fixture 5 | def get_instance(): 6 | s = CallClassBeforeStartingTest() 7 | s.call_function() 8 | return s 9 | 10 | 11 | @pytest.fixture(scope='session') 12 | def test_data(): 13 | return {"test_data": "This is test data which will be use in different test methods"} 14 | 15 | 16 | def test_simple(test_data, get_instance): 17 | assert test_instance.call_another_function(test_data) is not None 18 | -------------------------------------------------------------------------------- /chapter08/stacktrace_logging.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | a = 90 4 | b = 0 5 | 6 | try: 7 | c = a / b 8 | except Exception as e: 9 | logging.error("Exception ", exc_info=True) 10 | -------------------------------------------------------------------------------- /chapter08/unittest_example.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | 3 | class SimpleTest(TestCase): 4 | def test_simple(self): 5 | self.assertTrue(True) 6 | 7 | def test_tuple(self): 8 | self.assertEqual((1, 3, 4), (1, 3, 4)) 9 | 10 | def test_str(self): 11 | self.assertEqual('This is unit test', 'this is') 12 | -------------------------------------------------------------------------------- /chapter08/unittest_with_setup_teardown.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | 3 | 4 | class SetupBaseTestCase(TestCase): 5 | def setUp(self): 6 | self.sess = CallClassBeforeStartingTest() 7 | 8 | def test_simple(): 9 | self.sess.call_function() 10 | 11 | def tearDown(self): 12 | self.sess.close() 13 | -------------------------------------------------------------------------------- /chapter08/use_logging_conf.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import logging.config 3 | import yaml 4 | 5 | with open('logging.yaml', 'r') as f: 6 | config = yaml.safe_load(f.read()) 7 | logging.config.dictConfig(config) 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | logger.debug('Debug logging message') 12 | -------------------------------------------------------------------------------- /errata.md: -------------------------------------------------------------------------------- 1 | # Errata for *Book Title* 2 | 3 | On **page xx** [Summary of error]: 4 | 5 | Details of error here. Highlight key pieces in **bold**. 6 | 7 | *** 8 | 9 | On **page xx** [Summary of error]: 10 | 11 | Details of error here. Highlight key pieces in **bold**. 12 | 13 | *** --------------------------------------------------------------------------------