├── .gitignore ├── LICENCE ├── README.md ├── docs ├── .buildinfo ├── .nojekyll ├── The-Little-Book-Of-Python-Anti-Patterns.pdf ├── _images │ └── snake_warning.png ├── _sources │ ├── correctness │ │ ├── accessing_a_protected_member_from_outside_the_class.rst.txt │ │ ├── assigning_a_lambda_to_a_variable.rst.txt │ │ ├── assigning_to_builtin.rst.txt │ │ ├── bad_except_clauses_order.rst.txt │ │ ├── bad_first_argument_given_to_super.rst.txt │ │ ├── else_clause_on_loop_without_a_break_statement.rst.txt │ │ ├── exit_must_accept_three_arguments.rst.txt │ │ ├── explicit_return_in_init.rst.txt │ │ ├── future_import_is_not_the_first_statement.rst.txt │ │ ├── implementing_java-style_getters_and_setters.rst.txt │ │ ├── indentation_contains_mixed_spaces_and_tabs.rst.txt │ │ ├── indentation_contains_tabs.rst.txt │ │ ├── index.rst.txt │ │ ├── method_could_be_a_function.rst.txt │ │ ├── method_has_no_argument.rst.txt │ │ ├── missing_argument_to_super.rst.txt │ │ ├── mutable_default_value_as_argument.rst.txt │ │ ├── no_exception_type_specified.rst.txt │ │ ├── not_using_defaultdict.rst.txt │ │ ├── not_using_else_in_a_loop.rst.txt │ │ ├── not_using_explicit_unpacking.rst.txt │ │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.rst.txt │ │ ├── not_using_setdefault_to_initialize_a_dictionary.rst.txt │ │ ├── not_using_useless_classes.rst.txt │ │ └── working_with_json.rst.txt │ ├── django │ │ ├── 1.8 │ │ │ ├── index.rst.txt │ │ │ └── migration │ │ │ │ ├── index.rst.txt │ │ │ │ ├── template_debug_deprecated.rst.txt │ │ │ │ ├── template_dirs_deprecated.rst.txt │ │ │ │ ├── template_loaders_deprecated.rst.txt │ │ │ │ └── template_string_if_invalid_deprecated.rst.txt │ │ ├── all │ │ │ ├── correctness │ │ │ │ ├── index.rst.txt │ │ │ │ ├── not_using_forward_slashes.rst.txt │ │ │ │ ├── not_using_null_boolean_field.rst.txt │ │ │ │ └── using_null_boolean_field.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── maintainability │ │ │ │ ├── importing_django_model_fields.rst.txt │ │ │ │ └── index.rst.txt │ │ │ ├── performance │ │ │ │ ├── index.rst.txt │ │ │ │ └── inefficient_database_queries.rst.txt │ │ │ └── security │ │ │ │ ├── allowed_hosts_setting_missing.rst.txt │ │ │ │ ├── django_secrect_key_published.rst.txt │ │ │ │ ├── index.rst.txt │ │ │ │ ├── same_value_for_media_root_and_static_root.rst.txt │ │ │ │ └── same_value_for_media_url_and_static_url.rst.txt │ │ └── index.rst.txt │ ├── index.rst.txt │ ├── maintainability │ │ ├── dynamically_creating_names.rst.txt │ │ ├── from_module_import_all_used.rst.txt │ │ ├── index.rst.txt │ │ ├── not_using_with_to_open_files.rst.txt │ │ ├── returning_more_than_one_variable_type_from_function_call.rst.txt │ │ ├── using_single_letter_as_variable_name.rst.txt │ │ └── using_the_global_statement.rst.txt │ ├── performance │ │ ├── index.rst.txt │ │ ├── not_using_iteritems_to_iterate_large_dict.rst.txt │ │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.rst.txt │ ├── readability │ │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.rst.txt │ │ ├── comparison_to_none.rst.txt │ │ ├── comparison_to_true.rst.txt │ │ ├── do_not_compare_types_use_isinstance.rst.txt │ │ ├── index.rst.txt │ │ ├── not_using_a_dict_comprehension.rst.txt │ │ ├── not_using_dict_keys_when_formatting_strings.rst.txt │ │ ├── not_using_if_to_switch.rst.txt │ │ ├── not_using_items_to_iterate_over_a_dictionary.rst.txt │ │ ├── not_using_named_tuples_when_returning_more_than_one_value.rst.txt │ │ ├── not_using_unpacking_for_updating_multiple_values_at_once.rst.txt │ │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.rst.txt │ │ ├── putting_type_information_in_a_variable_name.rst.txt │ │ ├── test_for_object_identity_should_be_is_not.rst.txt │ │ ├── using_an_unpythonic_loop.rst.txt │ │ ├── using_camelcase_in_function_names.rst.txt │ │ └── using_map_or_filter_where_list_comprehension_is_possible.rst.txt │ └── security │ │ ├── index.rst.txt │ │ └── use_of_exec.rst.txt ├── _static │ ├── basic.css │ ├── css │ │ ├── badge_only.css │ │ ├── font-awesome-4.1.0 │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ ├── less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── spinning.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _spinning.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ ├── menu.css │ │ ├── ribbon.css │ │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── fonts │ │ ├── 1YwB1sO8YE1Lyjf12WNiUA.woff2 │ │ ├── AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 │ │ ├── AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 │ │ ├── AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ ├── BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ ├── BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 │ │ ├── BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 │ │ ├── FontAwesome.otf │ │ ├── H2DMvhDLycM56KNuAtbJYA.woff2 │ │ ├── ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 │ │ ├── UyBMtLsHKBKXelqf4x7VRQ.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 │ │ ├── dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ ├── y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 │ │ ├── y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 │ │ ├── y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 │ │ ├── y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 │ │ ├── y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 │ │ └── y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 │ ├── jquery-3.4.1.js │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ └── theme.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.3.1.js │ └── underscore.js ├── correctness │ ├── accessing_a_protected_member_from_outside_the_class.html │ ├── assigning_a_lambda_to_a_variable.html │ ├── assigning_to_builtin.html │ ├── bad_except_clauses_order.html │ ├── bad_first_argument_given_to_super.html │ ├── else_clause_on_loop_without_a_break_statement.html │ ├── exit_must_accept_three_arguments.html │ ├── explicit_return_in_init.html │ ├── future_import_is_not_the_first_statement.html │ ├── implementing_java-style_getters_and_setters.html │ ├── indentation_contains_mixed_spaces_and_tabs.html │ ├── indentation_contains_tabs.html │ ├── index.html │ ├── method_could_be_a_function.html │ ├── method_has_no_argument.html │ ├── missing_argument_to_super.html │ ├── mutable_default_value_as_argument.html │ ├── no_exception_type_specified.html │ ├── not_using_defaultdict.html │ ├── not_using_else_in_a_loop.html │ ├── not_using_explicit_unpacking.html │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.html │ ├── not_using_setdefault_to_initialize_a_dictionary.html │ ├── not_using_useless_classes.html │ └── working_with_json.html ├── django │ ├── 1.8 │ │ ├── index.html │ │ └── migration │ │ │ ├── index.html │ │ │ ├── template_debug_deprecated.html │ │ │ ├── template_dirs_deprecated.html │ │ │ ├── template_loaders_deprecated.html │ │ │ └── template_string_if_invalid_deprecated.html │ ├── all │ │ ├── correctness │ │ │ ├── index.html │ │ │ ├── not_using_forward_slashes.html │ │ │ ├── not_using_null_boolean_field.html │ │ │ └── using_null_boolean_field.html │ │ ├── index.html │ │ ├── maintainability │ │ │ ├── importing_django_model_fields.html │ │ │ └── index.html │ │ ├── performance │ │ │ ├── index.html │ │ │ └── inefficient_database_queries.html │ │ └── security │ │ │ ├── allowed_hosts_setting_missing.html │ │ │ ├── django_secrect_key_published.html │ │ │ ├── index.html │ │ │ ├── same_value_for_media_root_and_static_root.html │ │ │ └── same_value_for_media_url_and_static_url.html │ └── index.html ├── genindex.html ├── index.html ├── maintainability │ ├── dynamically_creating_names.html │ ├── from_module_import_all_used.html │ ├── index.html │ ├── not_using_with_to_open_files.html │ ├── returning_more_than_one_variable_type_from_function_call.html │ ├── using_single_letter_as_variable_name.html │ └── using_the_global_statement.html ├── objects.inv ├── performance │ ├── index.html │ ├── not_using_iteritems_to_iterate_large_dict.html │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.html ├── readability │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.html │ ├── comparison_to_none.html │ ├── comparison_to_true.html │ ├── do_not_compare_types_use_isinstance.html │ ├── index.html │ ├── not_using_a_dict_comprehension.html │ ├── not_using_dict_keys_when_formatting_strings.html │ ├── not_using_if_to_switch.html │ ├── not_using_items_to_iterate_over_a_dictionary.html │ ├── not_using_named_tuples_when_returning_more_than_one_value.html │ ├── not_using_unpacking_for_updating_multiple_values_at_once.html │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.html │ ├── putting_type_information_in_a_variable_name.html │ ├── test_for_object_identity_should_be_is_not.html │ ├── using_an_unpythonic_loop.html │ ├── using_camelcase_in_function_names.html │ └── using_map_or_filter_where_list_comprehension_is_possible.html ├── search.html ├── searchindex.js └── security │ ├── index.html │ └── use_of_exec.html ├── examples └── new_patterns.py ├── requirements.txt ├── src ├── LICENSE ├── Makefile ├── _build │ ├── doctrees │ │ ├── correctness │ │ │ ├── accessing_a_protected_member_from_outside_the_class.doctree │ │ │ ├── assigning_a_lambda_to_a_variable.doctree │ │ │ ├── assigning_to_builtin.doctree │ │ │ ├── bad_except_clauses_order.doctree │ │ │ ├── bad_first_argument_given_to_super.doctree │ │ │ ├── else_clause_on_loop_without_a_break_statement.doctree │ │ │ ├── exit_must_accept_three_arguments.doctree │ │ │ ├── explicit_return_in_init.doctree │ │ │ ├── future_import_is_not_the_first_statement.doctree │ │ │ ├── implementing_java-style_getters_and_setters.doctree │ │ │ ├── indentation_contains_mixed_spaces_and_tabs.doctree │ │ │ ├── indentation_contains_tabs.doctree │ │ │ ├── index.doctree │ │ │ ├── method_could_be_a_function.doctree │ │ │ ├── method_has_no_argument.doctree │ │ │ ├── missing_argument_to_super.doctree │ │ │ ├── mutable_default_value_as_argument.doctree │ │ │ ├── no_exception_type_specified.doctree │ │ │ ├── not_using_defaultdict.doctree │ │ │ ├── not_using_else_in_a_loop.doctree │ │ │ ├── not_using_explicit_unpacking.doctree │ │ │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.doctree │ │ │ ├── not_using_setdefault_to_initialize_a_dictionary.doctree │ │ │ ├── not_using_useless_classes.doctree │ │ │ └── working_with_json.doctree │ │ ├── django │ │ │ ├── 1.8 │ │ │ │ ├── index.doctree │ │ │ │ └── migration │ │ │ │ │ ├── index.doctree │ │ │ │ │ ├── template_debug_deprecated.doctree │ │ │ │ │ ├── template_dirs_deprecated.doctree │ │ │ │ │ ├── template_loaders_deprecated.doctree │ │ │ │ │ └── template_string_if_invalid_deprecated.doctree │ │ │ ├── all │ │ │ │ ├── correctness │ │ │ │ │ ├── index.doctree │ │ │ │ │ ├── not_using_forward_slashes.doctree │ │ │ │ │ └── not_using_null_boolean_field.doctree │ │ │ │ ├── index.doctree │ │ │ │ ├── maintainability │ │ │ │ │ ├── importing_django_model_fields.doctree │ │ │ │ │ └── index.doctree │ │ │ │ ├── performance │ │ │ │ │ ├── index.doctree │ │ │ │ │ └── inefficient_database_queries.doctree │ │ │ │ └── security │ │ │ │ │ ├── allowed_hosts_setting_missing.doctree │ │ │ │ │ ├── django_secrect_key_published.doctree │ │ │ │ │ ├── index.doctree │ │ │ │ │ ├── same_value_for_media_root_and_static_root.doctree │ │ │ │ │ └── same_value_for_media_url_and_static_url.doctree │ │ │ └── index.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── maintainability │ │ │ ├── dynamically_creating_names.doctree │ │ │ ├── from_module_import_all_used.doctree │ │ │ ├── index.doctree │ │ │ ├── not_using_with_to_open_files.doctree │ │ │ ├── returning_more_than_one_variable_type_from_function_call.doctree │ │ │ ├── using_single_letter_as_variable_name.doctree │ │ │ └── using_the_global_statement.doctree │ │ ├── performance │ │ │ ├── index.doctree │ │ │ ├── not_using_iteritems_to_iterate_large_dict.doctree │ │ │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.doctree │ │ ├── readability │ │ │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.doctree │ │ │ ├── comparison_to_none.doctree │ │ │ ├── comparison_to_true.doctree │ │ │ ├── do_not_compare_types_use_isinstance.doctree │ │ │ ├── index.doctree │ │ │ ├── not_using_a_dict_comprehension.doctree │ │ │ ├── not_using_dict_keys_when_formatting_strings.doctree │ │ │ ├── not_using_if_to_switch.doctree │ │ │ ├── not_using_items_to_iterate_over_a_dictionary.doctree │ │ │ ├── not_using_named_tuples_when_returning_more_than_one_value.doctree │ │ │ ├── not_using_unpacking_for_updating_multiple_values_at_once.doctree │ │ │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.doctree │ │ │ ├── putting_type_information_in_a_variable_name.doctree │ │ │ ├── test_for_object_identity_should_be_is_not.doctree │ │ │ ├── using_an_unpythonic_loop.doctree │ │ │ ├── using_camelcase_in_function_names.doctree │ │ │ └── using_map_or_filter_where_list_comprehension_is_possible.doctree │ │ └── security │ │ │ ├── index.doctree │ │ │ └── use_of_exec.doctree │ └── html │ │ └── python-anti-patterns │ │ ├── .buildinfo │ │ ├── _images │ │ └── snake_warning.png │ │ ├── _sources │ │ ├── correctness │ │ │ ├── accessing_a_protected_member_from_outside_the_class.rst.txt │ │ │ ├── assigning_a_lambda_to_a_variable.rst.txt │ │ │ ├── assigning_to_builtin.rst.txt │ │ │ ├── bad_except_clauses_order.rst.txt │ │ │ ├── bad_first_argument_given_to_super.rst.txt │ │ │ ├── else_clause_on_loop_without_a_break_statement.rst.txt │ │ │ ├── exit_must_accept_three_arguments.rst.txt │ │ │ ├── explicit_return_in_init.rst.txt │ │ │ ├── future_import_is_not_the_first_statement.rst.txt │ │ │ ├── implementing_java-style_getters_and_setters.rst.txt │ │ │ ├── indentation_contains_mixed_spaces_and_tabs.rst.txt │ │ │ ├── indentation_contains_tabs.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── method_could_be_a_function.rst.txt │ │ │ ├── method_has_no_argument.rst.txt │ │ │ ├── missing_argument_to_super.rst.txt │ │ │ ├── mutable_default_value_as_argument.rst.txt │ │ │ ├── no_exception_type_specified.rst.txt │ │ │ ├── not_using_defaultdict.rst.txt │ │ │ ├── not_using_else_in_a_loop.rst.txt │ │ │ ├── not_using_explicit_unpacking.rst.txt │ │ │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.rst.txt │ │ │ ├── not_using_setdefault_to_initialize_a_dictionary.rst.txt │ │ │ ├── not_using_useless_classes.rst.txt │ │ │ └── working_with_json.rst.txt │ │ ├── django │ │ │ ├── 1.8 │ │ │ │ ├── index.rst.txt │ │ │ │ └── migration │ │ │ │ │ ├── index.rst.txt │ │ │ │ │ ├── template_debug_deprecated.rst.txt │ │ │ │ │ ├── template_dirs_deprecated.rst.txt │ │ │ │ │ ├── template_loaders_deprecated.rst.txt │ │ │ │ │ └── template_string_if_invalid_deprecated.rst.txt │ │ │ ├── all │ │ │ │ ├── correctness │ │ │ │ │ ├── index.rst.txt │ │ │ │ │ ├── not_using_forward_slashes.rst.txt │ │ │ │ │ └── not_using_null_boolean_field.rst.txt │ │ │ │ ├── index.rst.txt │ │ │ │ ├── maintainability │ │ │ │ │ ├── importing_django_model_fields.rst.txt │ │ │ │ │ └── index.rst.txt │ │ │ │ ├── performance │ │ │ │ │ ├── index.rst.txt │ │ │ │ │ └── inefficient_database_queries.rst.txt │ │ │ │ └── security │ │ │ │ │ ├── allowed_hosts_setting_missing.rst.txt │ │ │ │ │ ├── django_secrect_key_published.rst.txt │ │ │ │ │ ├── index.rst.txt │ │ │ │ │ ├── same_value_for_media_root_and_static_root.rst.txt │ │ │ │ │ └── same_value_for_media_url_and_static_url.rst.txt │ │ │ └── index.rst.txt │ │ ├── index.rst.txt │ │ ├── maintainability │ │ │ ├── dynamically_creating_names.rst.txt │ │ │ ├── from_module_import_all_used.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── not_using_with_to_open_files.rst.txt │ │ │ ├── returning_more_than_one_variable_type_from_function_call.rst.txt │ │ │ ├── using_single_letter_as_variable_name.rst.txt │ │ │ └── using_the_global_statement.rst.txt │ │ ├── performance │ │ │ ├── index.rst.txt │ │ │ ├── not_using_iteritems_to_iterate_large_dict.rst.txt │ │ │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.rst.txt │ │ ├── readability │ │ │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.rst.txt │ │ │ ├── comparison_to_none.rst.txt │ │ │ ├── comparison_to_true.rst.txt │ │ │ ├── do_not_compare_types_use_isinstance.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── not_using_a_dict_comprehension.rst.txt │ │ │ ├── not_using_dict_keys_when_formatting_strings.rst.txt │ │ │ ├── not_using_if_to_switch.rst.txt │ │ │ ├── not_using_items_to_iterate_over_a_dictionary.rst.txt │ │ │ ├── not_using_named_tuples_when_returning_more_than_one_value.rst.txt │ │ │ ├── not_using_unpacking_for_updating_multiple_values_at_once.rst.txt │ │ │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.rst.txt │ │ │ ├── putting_type_information_in_a_variable_name.rst.txt │ │ │ ├── test_for_object_identity_should_be_is_not.rst.txt │ │ │ ├── using_an_unpythonic_loop.rst.txt │ │ │ ├── using_camelcase_in_function_names.rst.txt │ │ │ └── using_map_or_filter_where_list_comprehension_is_possible.rst.txt │ │ └── security │ │ │ ├── index.rst.txt │ │ │ └── use_of_exec.rst.txt │ │ ├── _static │ │ ├── basic.css │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── font-awesome-4.1.0 │ │ │ │ ├── css │ │ │ │ │ ├── font-awesome.css │ │ │ │ │ └── font-awesome.min.css │ │ │ │ ├── fonts │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ └── fontawesome-webfont.woff │ │ │ │ ├── less │ │ │ │ │ ├── bordered-pulled.less │ │ │ │ │ ├── core.less │ │ │ │ │ ├── fixed-width.less │ │ │ │ │ ├── font-awesome.less │ │ │ │ │ ├── icons.less │ │ │ │ │ ├── larger.less │ │ │ │ │ ├── list.less │ │ │ │ │ ├── mixins.less │ │ │ │ │ ├── path.less │ │ │ │ │ ├── rotated-flipped.less │ │ │ │ │ ├── spinning.less │ │ │ │ │ ├── stacked.less │ │ │ │ │ └── variables.less │ │ │ │ └── scss │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ ├── _core.scss │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ ├── _icons.scss │ │ │ │ │ ├── _larger.scss │ │ │ │ │ ├── _list.scss │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ ├── _path.scss │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ ├── _spinning.scss │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ ├── _variables.scss │ │ │ │ │ └── font-awesome.scss │ │ │ ├── menu.css │ │ │ ├── ribbon.css │ │ │ └── theme.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── fonts │ │ │ ├── 1YwB1sO8YE1Lyjf12WNiUA.woff2 │ │ │ ├── AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 │ │ │ ├── AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 │ │ │ ├── AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 │ │ │ ├── FontAwesome.otf │ │ │ ├── H2DMvhDLycM56KNuAtbJYA.woff2 │ │ │ ├── ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 │ │ │ ├── UyBMtLsHKBKXelqf4x7VRQ.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 │ │ │ ├── dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ │ ├── y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 │ │ │ ├── y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 │ │ │ ├── y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 │ │ │ ├── y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 │ │ │ ├── y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 │ │ │ └── y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 │ │ ├── jquery-3.4.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── underscore-1.3.1.js │ │ └── underscore.js │ │ ├── correctness │ │ ├── accessing_a_protected_member_from_outside_the_class.html │ │ ├── assigning_a_lambda_to_a_variable.html │ │ ├── assigning_to_builtin.html │ │ ├── bad_except_clauses_order.html │ │ ├── bad_first_argument_given_to_super.html │ │ ├── else_clause_on_loop_without_a_break_statement.html │ │ ├── exit_must_accept_three_arguments.html │ │ ├── explicit_return_in_init.html │ │ ├── future_import_is_not_the_first_statement.html │ │ ├── implementing_java-style_getters_and_setters.html │ │ ├── indentation_contains_mixed_spaces_and_tabs.html │ │ ├── indentation_contains_tabs.html │ │ ├── index.html │ │ ├── method_could_be_a_function.html │ │ ├── method_has_no_argument.html │ │ ├── missing_argument_to_super.html │ │ ├── mutable_default_value_as_argument.html │ │ ├── no_exception_type_specified.html │ │ ├── not_using_defaultdict.html │ │ ├── not_using_else_in_a_loop.html │ │ ├── not_using_explicit_unpacking.html │ │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.html │ │ ├── not_using_setdefault_to_initialize_a_dictionary.html │ │ ├── not_using_useless_classes.html │ │ └── working_with_json.html │ │ ├── django │ │ ├── 1.8 │ │ │ ├── index.html │ │ │ └── migration │ │ │ │ ├── index.html │ │ │ │ ├── template_debug_deprecated.html │ │ │ │ ├── template_dirs_deprecated.html │ │ │ │ ├── template_loaders_deprecated.html │ │ │ │ └── template_string_if_invalid_deprecated.html │ │ ├── all │ │ │ ├── correctness │ │ │ │ ├── index.html │ │ │ │ ├── not_using_forward_slashes.html │ │ │ │ └── not_using_null_boolean_field.html │ │ │ ├── index.html │ │ │ ├── maintainability │ │ │ │ ├── importing_django_model_fields.html │ │ │ │ └── index.html │ │ │ ├── performance │ │ │ │ ├── index.html │ │ │ │ └── inefficient_database_queries.html │ │ │ └── security │ │ │ │ ├── allowed_hosts_setting_missing.html │ │ │ │ ├── django_secrect_key_published.html │ │ │ │ ├── index.html │ │ │ │ ├── same_value_for_media_root_and_static_root.html │ │ │ │ └── same_value_for_media_url_and_static_url.html │ │ └── index.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── maintainability │ │ ├── dynamically_creating_names.html │ │ ├── from_module_import_all_used.html │ │ ├── index.html │ │ ├── not_using_with_to_open_files.html │ │ ├── returning_more_than_one_variable_type_from_function_call.html │ │ ├── using_single_letter_as_variable_name.html │ │ └── using_the_global_statement.html │ │ ├── objects.inv │ │ ├── performance │ │ ├── index.html │ │ ├── not_using_iteritems_to_iterate_large_dict.html │ │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.html │ │ ├── readability │ │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.html │ │ ├── comparison_to_none.html │ │ ├── comparison_to_true.html │ │ ├── do_not_compare_types_use_isinstance.html │ │ ├── index.html │ │ ├── not_using_a_dict_comprehension.html │ │ ├── not_using_dict_keys_when_formatting_strings.html │ │ ├── not_using_if_to_switch.html │ │ ├── not_using_items_to_iterate_over_a_dictionary.html │ │ ├── not_using_named_tuples_when_returning_more_than_one_value.html │ │ ├── not_using_unpacking_for_updating_multiple_values_at_once.html │ │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.html │ │ ├── putting_type_information_in_a_variable_name.html │ │ ├── test_for_object_identity_should_be_is_not.html │ │ ├── using_an_unpythonic_loop.html │ │ ├── using_camelcase_in_function_names.html │ │ └── using_map_or_filter_where_list_comprehension_is_possible.html │ │ ├── search.html │ │ ├── searchindex.js │ │ └── security │ │ ├── index.html │ │ └── use_of_exec.html ├── _themes │ ├── .gitignore │ ├── LICENSE │ ├── README │ ├── flask │ │ ├── layout.html │ │ ├── relations.html │ │ ├── static │ │ │ └── flasky.css_t │ │ └── theme.conf │ ├── flask_small │ │ ├── layout.html │ │ ├── static │ │ │ └── flasky.css_t │ │ └── theme.conf │ ├── flask_theme_support.py │ ├── quantifiedcode │ │ ├── __init__.py │ │ ├── breadcrumbs.html │ │ ├── footer.html │ │ ├── layout.html │ │ ├── layout_old.html │ │ ├── search.html │ │ ├── searchbox.html │ │ ├── static │ │ │ ├── css │ │ │ │ ├── badge_only.css │ │ │ │ ├── font-awesome-4.1.0 │ │ │ │ │ ├── css │ │ │ │ │ │ ├── font-awesome.css │ │ │ │ │ │ └── font-awesome.min.css │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ └── fontawesome-webfont.woff │ │ │ │ │ ├── less │ │ │ │ │ │ ├── bordered-pulled.less │ │ │ │ │ │ ├── core.less │ │ │ │ │ │ ├── fixed-width.less │ │ │ │ │ │ ├── font-awesome.less │ │ │ │ │ │ ├── icons.less │ │ │ │ │ │ ├── larger.less │ │ │ │ │ │ ├── list.less │ │ │ │ │ │ ├── mixins.less │ │ │ │ │ │ ├── path.less │ │ │ │ │ │ ├── rotated-flipped.less │ │ │ │ │ │ ├── spinning.less │ │ │ │ │ │ ├── stacked.less │ │ │ │ │ │ └── variables.less │ │ │ │ │ └── scss │ │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ │ ├── _core.scss │ │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ │ ├── _icons.scss │ │ │ │ │ │ ├── _larger.scss │ │ │ │ │ │ ├── _list.scss │ │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ │ ├── _path.scss │ │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ │ ├── _spinning.scss │ │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ │ ├── _variables.scss │ │ │ │ │ │ └── font-awesome.scss │ │ │ │ ├── menu.css │ │ │ │ ├── ribbon.css │ │ │ │ └── theme.css │ │ │ ├── fonts │ │ │ │ ├── 1YwB1sO8YE1Lyjf12WNiUA.woff2 │ │ │ │ ├── AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 │ │ │ │ ├── AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 │ │ │ │ ├── AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 │ │ │ │ ├── BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── H2DMvhDLycM56KNuAtbJYA.woff2 │ │ │ │ ├── ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 │ │ │ │ ├── UyBMtLsHKBKXelqf4x7VRQ.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 │ │ │ │ ├── dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 │ │ │ │ ├── y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 │ │ │ │ ├── y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 │ │ │ │ ├── y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 │ │ │ │ ├── y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 │ │ │ │ ├── y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 │ │ │ │ └── y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 │ │ │ └── js │ │ │ │ └── theme.js │ │ ├── theme.conf │ │ └── versions.html │ └── sphinx_rtd_theme │ │ ├── __init__.py │ │ ├── breadcrumbs.html │ │ ├── footer.html │ │ ├── layout.html │ │ ├── layout_old.html │ │ ├── search.html │ │ ├── searchbox.html │ │ ├── static │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── font-awesome-4.1.0 │ │ │ │ ├── css │ │ │ │ │ ├── font-awesome.css │ │ │ │ │ └── font-awesome.min.css │ │ │ │ ├── fonts │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ └── fontawesome-webfont.woff │ │ │ │ ├── less │ │ │ │ │ ├── bordered-pulled.less │ │ │ │ │ ├── core.less │ │ │ │ │ ├── fixed-width.less │ │ │ │ │ ├── font-awesome.less │ │ │ │ │ ├── icons.less │ │ │ │ │ ├── larger.less │ │ │ │ │ ├── list.less │ │ │ │ │ ├── mixins.less │ │ │ │ │ ├── path.less │ │ │ │ │ ├── rotated-flipped.less │ │ │ │ │ ├── spinning.less │ │ │ │ │ ├── stacked.less │ │ │ │ │ └── variables.less │ │ │ │ └── scss │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ ├── _core.scss │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ ├── _icons.scss │ │ │ │ │ ├── _larger.scss │ │ │ │ │ ├── _list.scss │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ ├── _path.scss │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ ├── _spinning.scss │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ ├── _variables.scss │ │ │ │ │ └── font-awesome.scss │ │ │ ├── menu.css │ │ │ ├── ribbon.css │ │ │ └── theme.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ └── js │ │ │ └── theme.js │ │ ├── theme.conf │ │ └── versions.html ├── conf.py ├── correctness │ ├── accessing_a_protected_member_from_outside_the_class.rst │ ├── assigning_a_lambda_to_a_variable.rst │ ├── assigning_to_builtin.rst │ ├── bad_except_clauses_order.rst │ ├── bad_first_argument_given_to_super.rst │ ├── else_clause_on_loop_without_a_break_statement.rst │ ├── exit_must_accept_three_arguments.rst │ ├── explicit_return_in_init.rst │ ├── future_import_is_not_the_first_statement.rst │ ├── implementing_java-style_getters_and_setters.rst │ ├── indentation_contains_mixed_spaces_and_tabs.rst │ ├── indentation_contains_tabs.rst │ ├── index.rst │ ├── method_could_be_a_function.rst │ ├── method_has_no_argument.rst │ ├── missing_argument_to_super.rst │ ├── mutable_default_value_as_argument.rst │ ├── no_exception_type_specified.rst │ ├── not_using_defaultdict.rst │ ├── not_using_else_in_a_loop.rst │ ├── not_using_explicit_unpacking.rst │ ├── not_using_get_to_return_a_default_value_from_a_dictionary.rst │ ├── not_using_setdefault_to_initialize_a_dictionary.rst │ ├── not_using_useless_classes.rst │ └── working_with_json.rst ├── django │ ├── 1.8 │ │ ├── index.rst │ │ └── migration │ │ │ ├── index.rst │ │ │ ├── template_debug_deprecated.rst │ │ │ ├── template_dirs_deprecated.rst │ │ │ ├── template_loaders_deprecated.rst │ │ │ └── template_string_if_invalid_deprecated.rst │ ├── all │ │ ├── correctness │ │ │ ├── index.rst │ │ │ ├── not_using_forward_slashes.rst │ │ │ └── using_null_boolean_field.rst │ │ ├── index.rst │ │ ├── maintainability │ │ │ ├── importing_django_model_fields.rst │ │ │ └── index.rst │ │ ├── performance │ │ │ ├── index.rst │ │ │ └── inefficient_database_queries.rst │ │ └── security │ │ │ ├── allowed_hosts_setting_missing.rst │ │ │ ├── django_secrect_key_published.rst │ │ │ ├── index.rst │ │ │ ├── same_value_for_media_root_and_static_root.rst │ │ │ └── same_value_for_media_url_and_static_url.rst │ └── index.rst ├── index.rst ├── logo_qc.png ├── maintainability │ ├── dynamically_creating_names.rst │ ├── from_module_import_all_used.rst │ ├── index.rst │ ├── not_using_with_to_open_files.rst │ ├── returning_more_than_one_variable_type_from_function_call.rst │ ├── using_single_letter_as_variable_name.rst │ └── using_the_global_statement.rst ├── make.bat ├── performance │ ├── index.rst │ ├── not_using_iteritems_to_iterate_large_dict.rst │ └── using_key_in_list_to_check_if_key_is_contained_in_a_list.rst ├── readability │ ├── asking_for_permission_instead_of_forgiveness_when_working_with_files.rst │ ├── comparison_to_none.rst │ ├── comparison_to_true.rst │ ├── do_not_compare_types_use_isinstance.rst │ ├── index.rst │ ├── not_using_a_dict_comprehension.rst │ ├── not_using_dict_keys_when_formatting_strings.rst │ ├── not_using_if_to_switch.rst │ ├── not_using_items_to_iterate_over_a_dictionary.rst │ ├── not_using_named_tuples_when_returning_more_than_one_value.rst │ ├── not_using_unpacking_for_updating_multiple_values_at_once.rst │ ├── not_using_zip_to_iterate_over_a_pair_of_lists.rst │ ├── putting_type_information_in_a_variable_name.rst │ ├── test_for_object_identity_should_be_is_not.rst │ ├── using_an_unpythonic_loop.rst │ ├── using_camelcase_in_function_names.rst │ └── using_map_or_filter_where_list_comprehension_is_possible.rst ├── security │ ├── index.rst │ └── use_of_exec.rst └── snake_warning.png └── templates ├── anti_pattern.rst └── migration_pattern.rst /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | bin/ 12 | *.orig 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | eggs/ 17 | docs/_build/ 18 | venv/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # Installer logs 29 | pip-log.txt 30 | pip-delete-this-directory.txt 31 | 32 | # Unit test / coverage reports 33 | htmlcov/ 34 | .tox/ 35 | .coverage 36 | .cache 37 | nosetests.xml 38 | coverage.xml 39 | 40 | # Translations 41 | *.mo 42 | 43 | # Mr Developer 44 | .mr.developer.cfg 45 | .project 46 | .pydevproject 47 | 48 | # Rope 49 | .ropeproject 50 | 51 | # Django stuff: 52 | *.log 53 | *.pot 54 | 55 | # Sphinx documentation 56 | docs/_build/ 57 | 58 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. 2 | 3 | For a summary of the licence, go to: http://creativecommons.org/licenses/by-nc-sa/4.0/ 4 | 5 | The full licence visit: http://creativecommons.org/licenses/by-nc-sa/4.0/legalcode 6 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 761d15417d6021c9b88b53ddd71ca2db 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/.nojekyll -------------------------------------------------------------------------------- /docs/The-Little-Book-Of-Python-Anti-Patterns.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/The-Little-Book-Of-Python-Anti-Patterns.pdf -------------------------------------------------------------------------------- /docs/_images/snake_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_images/snake_warning.png -------------------------------------------------------------------------------- /docs/_sources/correctness/accessing_a_protected_member_from_outside_the_class.rst.txt: -------------------------------------------------------------------------------- 1 | Accessing a protected member from outside the class 2 | =================================================== 3 | 4 | Accessing a protected member (a member prefixed with ``_``) of a class from outside that class usually 5 | calls for trouble, since the creator of that class did not intend this member to be exposed. 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | class Rectangle(object): 13 | def __init__(self, width, height): 14 | self._width = width 15 | self._height = height 16 | 17 | r = Rectangle(5, 6) 18 | # direct access of protected member 19 | print("Width: {:d}".format(r._width)) 20 | 21 | Best practice 22 | ------------- 23 | 24 | If you are absolutely sure that you need to access the protected member from the outside, 25 | do the following: 26 | 27 | * Make sure that accessing the member from outside the class does not cause any inadvertent side effects. 28 | * Refactor it such that it becomes part of the public interface of the class. 29 | 30 | References 31 | ---------- 32 | 33 | - PyLint - W0212, protected-access 34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/_sources/correctness/indentation_contains_tabs.rst.txt: -------------------------------------------------------------------------------- 1 | Indentation contains tabs 2 | ========================= 3 | 4 | Per the PEP 8 Style Guide, all Python code should be consistently indented with 4 spaces for each level of indentation, not tabs. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The following code uses tabs for indentation. Python code should be indented with four spaces for each level of indentation. 10 | 11 | .. code:: python 12 | 13 | def print_hello_world(): 14 | # indented with tab 15 | print("Hello, World!") 16 | def print_goodbye_world(): 17 | # indented with tab 18 | print("Goodbye, World!") 19 | 20 | Best practice 21 | ------------- 22 | 23 | Consistently indent with spaces 24 | ............................... 25 | 26 | All Python code should be consistently indented with 4 spaces. 27 | 28 | .. code:: python 29 | 30 | def print_hello_world(): 31 | # indented with 4 spaces 32 | print("Hello, World!") 33 | def print_goodbye_world(): 34 | # indented with 4 spaces 35 | print("Goodbye, World!") 36 | 37 | 38 | References 39 | ---------- 40 | - `PEP 8 Style Guide - Tabs or Spaces? `_ 41 | - `PEP 8 Style Guide - Indentation `_ 42 | 43 | 44 | -------------------------------------------------------------------------------- /docs/_sources/correctness/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | accessing_a_protected_member_from_outside_the_class 8 | assigning_a_lambda_to_a_variable 9 | assigning_to_builtin 10 | bad_except_clauses_order 11 | bad_first_argument_given_to_super 12 | else_clause_on_loop_without_a_break_statement 13 | exit_must_accept_three_arguments 14 | explicit_return_in_init 15 | future_import_is_not_the_first_statement 16 | implementing_java-style_getters_and_setters 17 | indentation_contains_mixed_spaces_and_tabs 18 | indentation_contains_tabs 19 | method_could_be_a_function 20 | method_has_no_argument 21 | missing_argument_to_super 22 | mutable_default_value_as_argument 23 | no_exception_type_specified 24 | not_using_defaultdict 25 | not_using_else_in_a_loop 26 | not_using_explicit_unpacking 27 | not_using_get_to_return_a_default_value_from_a_dictionary 28 | not_using_setdefault_to_initialize_a_dictionary 29 | 30 | -------------------------------------------------------------------------------- /docs/_sources/correctness/not_using_explicit_unpacking.rst.txt: -------------------------------------------------------------------------------- 1 | Not using explicit unpacking 2 | ============================ 3 | 4 | When you see multiple variables being defined followed by an assignment to a list (e.g. ``elem0, elem1, elem2 = elems``, where ``elem0``, ``elem1``, and ``elem2`` are variables and ``elems`` is a list), Python will automatically iterate through the list and assign ``elems[0]`` to ``elem0``, ``elems[1]`` to ``elem1``, and so on. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The code below manually creates multiple variables to access the items in a list. This code is error-prone and unnecessarily verbose, as well as tedious to write. 10 | 11 | .. code:: python 12 | 13 | elems = [4, 7, 18] 14 | 15 | elem0 = elems[0] 16 | elem1 = elems[1] 17 | elem2 = elems[2] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Use unpacking 23 | ............. 24 | 25 | The modified code below is functionally equivalent to the original code, but this code is more concise and less prone to error. 26 | 27 | .. code:: python 28 | 29 | elems = [4, 7, 18] 30 | 31 | elem0, elem1, elem2 = elems 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/_sources/correctness/not_using_useless_classes.rst.txt: -------------------------------------------------------------------------------- 1 | Don't use just class 2 | ==================== 3 | 4 | When you have a method that doesn't really needs a class to belong, don't create a new class just to put it inside. In Python we can create methods that don't belong to class. 5 | 6 | Anti-Pattern 7 | ------------ 8 | 9 | The ``DateUtil`` class below has the ``convert`` method that transforms a weekday from datetime to weekday in string form. 10 | 11 | .. code:: python 12 | 13 | class DateUtil: 14 | @staticmethod 15 | def from_weekday_to_string(weekday): 16 | nameds_weekdays = { 17 | 0: 'Monday', 18 | 5: 'Friday' 19 | } 20 | return nameds_weekdays[weekday] 21 | 22 | It's not necessary create a class to do this. You could just create a new file to put it, or put it in an existing one. 23 | 24 | Best Practice 25 | ------------- 26 | Puting the method outside of the class 27 | ...................................... 28 | 29 | It is usually easier to write just one simple method. This makes the overhead of w whole class unnecessary. 30 | 31 | .. code:: python 32 | 33 | def from_weekday_to_string(weekday): 34 | nameds_weekdays = { 35 | 0: 'Monday', 36 | 5: 'Friday' 37 | } 38 | return nameds_weekdays[weekday] 39 | 40 | -------------------------------------------------------------------------------- /docs/_sources/correctness/working_with_json.rst.txt: -------------------------------------------------------------------------------- 1 | Working with json correctly 2 | =================================================== 3 | 4 | When reading or writing json from/to a file-like object, don't use json.loads/json.dumps. The json module has respective methods to work with json from a file. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | # read from file-like 12 | with open("json_file.json") as json_file: 13 | json_string = json_file.read() 14 | dictionary = json.loads(json_string) 15 | 16 | # write to file-like 17 | dictionary = {"key": "value"} 18 | with open("json_file.json", "w") as json_file: 19 | json_string = json.dumps(dictionary) 20 | json.file.write(json_string) 21 | 22 | Best practice 23 | ------------- 24 | When read/write to file-like objects use the json respective method load/dump instead of using loads/dumps. 25 | 26 | .. code:: python 27 | 28 | # read from file-like 29 | with open("json_file") as json_file: 30 | dictionary = json.load(json_file) 31 | 32 | # write to file-like 33 | dictionary = {"key": "value"} 34 | with open("json_file.json", "w") as json_file: 35 | json.dump(dictionary, json_file) 36 | 37 | References 38 | ---------- 39 | 40 | - `http://chimera.labs.oreilly.com/books/1230000000393/ch06.html#_solution_95` 41 | -------------------------------------------------------------------------------- /docs/_sources/django/1.8/index.rst.txt: -------------------------------------------------------------------------------- 1 | 1.8 2 | === 3 | 4 | In this section, you'll find anti-patterns that apply specifically to Django 1.8. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | migration/index 10 | 11 | -------------------------------------------------------------------------------- /docs/_sources/django/1.8/migration/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`magic` Migration to 1.8 2 | =========================== 3 | 4 | Migrating to a new Django version can be time consuming. To make this process easier, this chapter lists deprecated features and shows potential migration patterns/pathes. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | template_dirs_deprecated 10 | template_debug_deprecated 11 | template_loaders_deprecated 12 | template_string_if_invalid_deprecated 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/_sources/django/all/correctness/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | not_using_forward_slashes 8 | not_using_null_boolean_field 9 | -------------------------------------------------------------------------------- /docs/_sources/django/all/index.rst.txt: -------------------------------------------------------------------------------- 1 | All (recent) versions 2 | ===================== 3 | 4 | This chapter contains anti- and migration patterns that apply to all (recent) Django version. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | maintainability/index 10 | security/index 11 | correctness/index 12 | performance/index 13 | 14 | -------------------------------------------------------------------------------- /docs/_sources/django/all/maintainability/importing_django_model_fields.rst.txt: -------------------------------------------------------------------------------- 1 | Importing django.db.models.fields 2 | ================================= 3 | 4 | In Django, models are defined in ``django.db.models.fields``. However, for convenience they are imported into ``django.db.models``. Django's standard convention is to use ``from django.db import models`` and refer to fields as ``modelsField``. To improve readability and maintainability of your code, change your import statement and model definition. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | from django.db.models import fields 12 | 13 | class Person(models.Model): 14 | first_name = fields.CharField(max_length=30) 15 | last_name = fields.CharField(max_length=30) 16 | 17 | Best practice 18 | ------------- 19 | 20 | Stick to standard conventions and use ``from django.db import models`` instead. 21 | 22 | .. code:: python 23 | 24 | from django.db import models 25 | 26 | class Person(models.Model): 27 | first_name = models.CharField(max_length=30) 28 | last_name = models.CharField(max_length=30) 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Model field reference `_ 34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/_sources/django/all/maintainability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | Avoid the following anti-patterns to increase maintainability of your Django code base—for you, and for others. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | importing_django_model_fields 10 | -------------------------------------------------------------------------------- /docs/_sources/django/all/performance/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | Django has a lot of mechanisms built-in to build fast and efficient web applications. Still, there are several things to watch out for, especially when you start to scale your Django application. This chapter contains anti-patterns that can potentially harm the performance of your application and hence, should be avoided. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | inefficient_database_queries 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/_sources/django/all/security/allowed_hosts_setting_missing.rst.txt: -------------------------------------------------------------------------------- 1 | ALLOWED_HOSTS setting missing 2 | ============================= 3 | 4 | In Django, you need to properly set the ``ALLOWED_HOSTS`` setting when ``DEBUG = False``. This is a security mechanism. It prevents attackers from poisoning caches or password reset emails with links to malicious hosts by submitting requests with a fake HTTP Host header, which is possible even under many seemingly-safe web server configurations. 5 | 6 | Anti-Pattern 7 | ------------ 8 | 9 | ``ALLOWED_HOSTS`` not set or empty, when ``DEBUG = False``. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | DEBUG = False 16 | # ... 17 | ALLOWED_HOSTS = [] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Make sure, an appropriate host is set in `ALLOWED_HOSTS`, whenever `DEBUG = False`. 23 | 24 | .. code:: python 25 | 26 | DEBUG = False 27 | # ... 28 | ALLOWED_HOSTS = ['djangoproject.com'] 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Settings: The Basics `_ 34 | - `Django documentation - Settings: ALLOWED_HOSTS `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/_sources/django/all/security/django_secrect_key_published.rst.txt: -------------------------------------------------------------------------------- 1 | SECRET_KEY published 2 | ==================== 3 | 4 | A secret key has to be be kept secret. Make sure it is only used in production, but nowhere else. Especially, avoid committing it to source control. This increases security and makes it less likely that an attacker may acquire the key. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | This settings.py contains a SECRET_KEY. You should not do this! 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 15 | 16 | Better Practices 17 | ---------------- 18 | Load key from environment variable 19 | .................................. 20 | 21 | Instead of publishing your secret key, you can use an environment variable to set your secret key. 22 | 23 | .. code:: python 24 | 25 | import os 26 | SECRET_KEY = os.environ['SECRET_KEY'] 27 | 28 | 29 | Load secret key from file 30 | ......................... 31 | 32 | Alternatively, you can read the secret key from a file. 33 | 34 | .. code:: python 35 | 36 | with open('/etc/secret_key.txt') as f: 37 | SECRET_KEY = f.read().strip() 38 | 39 | References 40 | ----------- 41 | - `Django `_ 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/_sources/django/all/security/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Most Django applications contain a lot of proprietory or even confidential information. Hence, it is crucial to take all possible measures to take your Django application secure and to recude the possibility of being hacked. 5 | 6 | Use the following patterns to increase the security of your code. 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | 11 | allowed_hosts_setting_missing 12 | django_secrect_key_published 13 | same_value_for_media_root_and_static_root 14 | same_value_for_media_url_and_static_url 15 | 16 | -------------------------------------------------------------------------------- /docs/_sources/django/all/security/same_value_for_media_root_and_static_root.rst.txt: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_ROOT and STATIC_ROOT 2 | ========================================= 3 | 4 | According to Django's documentation, ``MEDIA_ROOT`` and ``STATIC_ROOT`` must have different values. Before STATIC_ROOT was introduced, ``MEDIA_ROOT`` was also used (as fallback) to also serve static files. As this can have serious security implications, Django has validation checks to prevent it. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_ROOT`` and ``STATIC_ROOT`` point to the same folder. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_ROOT = '/path/to/my/static/files' 17 | MEDIA_ROOT = '/path/to/my/static/files' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, ``STATIC_ROOT`` and ``MEDIA_ROOT`` point to different folders. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_ROOT = '/path/to/my/static/files' 29 | MEDIA_ROOT = '/path/to/my/media/files' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_ROOT `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/_sources/django/all/security/same_value_for_media_url_and_static_url.rst.txt: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_URL and STATIC_URL 2 | ======================================= 3 | 4 | According to Django's documentation, ``MEDIA_URL`` and ``STATIC_URL`` must have different values. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_URL`` and ``STATIC_URL`` point to the same URL. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_URL = 'http://www.mysite.com/static' 17 | MEDIA_URL = 'http://www.mysite.com/static' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, `STATIC_URL` and `MEDIA_URL` point to different URL's. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_URL = 'http://www.mysite.com/static' 29 | MEDIA_URL = 'http://www.mysite.com/media' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_URL `_ 35 | - `Django documentation - Settings: MEDIA_ROOT `_ 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /docs/_sources/django/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`book` Django 2 | ================= 3 | 4 | Django is a great framework to create fast and scalable web applications. To help you write great Django apps from the start, we started to compile a set of anti- and migration patterns. They'll help you to avoid common mistakes or to migrate to a new version faster. Some patterns are simply (more elaborate) explanations of tips and best practices that can be found in Django's docs. Others stem from our own experiences. Feel free to contribute your ideas or share your pattern via `email `_. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | all/maintainability/index 10 | all/security/index 11 | all/correctness/index 12 | all/performance/index 13 | 1.8/migration/index 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/_sources/maintainability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | A program is **maintainable** if it is easy to understand and modify the code even for someone 5 | that is unfamiliar with the code base. 6 | 7 | Avoid the following anti-patterns to increase maintainability and avoid creating `spaghetti code`. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | from_module_import_all_used 13 | not_using_with_to_open_files 14 | returning_more_than_one_variable_type_from_function_call 15 | using_the_global_statement 16 | using_single_letter_as_variable_name 17 | dynamically_creating_names 18 | -------------------------------------------------------------------------------- /docs/_sources/performance/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | In Python, large performance gains can be obtained by using appropriate functions and directives. 5 | Avoid the following anti-patterns to reduce overhead and make your code more performant. 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | using_key_in_list_to_check_if_key_is_contained_in_a_list 11 | not_using_iteritems_to_iterate_large_dict 12 | -------------------------------------------------------------------------------- /docs/_sources/readability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`eye` Readability 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | asking_for_permission_instead_of_forgiveness_when_working_with_files 8 | comparison_to_none 9 | comparison_to_true 10 | do_not_compare_types_use_isinstance 11 | not_using_a_dict_comprehension 12 | not_using_dict_keys_when_formatting_strings 13 | not_using_items_to_iterate_over_a_dictionary 14 | not_using_named_tuples_when_returning_more_than_one_value 15 | not_using_unpacking_for_updating_multiple_values_at_once 16 | not_using_zip_to_iterate_over_a_pair_of_lists 17 | putting_type_information_in_a_variable_name 18 | test_for_object_identity_should_be_is_not 19 | using_an_unpythonic_loop 20 | using_map_or_filter_where_list_comprehension_is_possible 21 | using_camelcase_in_function_names 22 | -------------------------------------------------------------------------------- /docs/_sources/readability/using_camelcase_in_function_names.rst.txt: -------------------------------------------------------------------------------- 1 | Using `CamelCase` in function names 2 | =================================== 3 | 4 | Per the PEP 8 Style Guide, function names should be lowercase, with words separated by underscores. 5 | 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | def someFunction(): 13 | print("Is not the preferred PEP 8 pattern for function names") 14 | 15 | Best practice 16 | ------------- 17 | 18 | Using lowercase with underscores 19 | ................................ 20 | 21 | The code below uses the PEP 8 preferred pattern of function names. 22 | 23 | .. code:: python 24 | 25 | def some_function(): 26 | print("PEP 8 Style Guide prefers this pattern") 27 | 28 | References 29 | ---------- 30 | - `PEP8 Style Guide - Function names `_ 31 | -------------------------------------------------------------------------------- /docs/_sources/security/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Python is a highly dynamic language that gives the programmer many ways to change the runtime 5 | behavior of his code and even dynamically execute new code. This is powerful but can be a security 6 | risk as well. 7 | 8 | Use the following patterns to increase the security of your code. 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | use_of_exec 14 | 15 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/css/font-awesome-4.1.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /docs/_static/css/font-awesome-4.1.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /docs/_static/css/menu.css: -------------------------------------------------------------------------------- 1 | .toctree-wrapper ul li.toctree-l1 2 | { 3 | font-size:22px; 4 | margin-bottom:10px; 5 | margin-left:0px; 6 | list-style-type: none !important; 7 | } 8 | .toctree-wrapper li.toctree-l2 9 | { 10 | list-style:none !important; 11 | font-size:14px; 12 | margin-bottom:3px; 13 | margin-top:3px; 14 | } -------------------------------------------------------------------------------- /docs/_static/css/ribbon.css: -------------------------------------------------------------------------------- 1 | @media(max-width:768px) 2 | { 3 | .github_ribbon 4 | { 5 | display:none; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/_static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/docs/objects.inv -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | 3 | -------------------------------------------------------------------------------- /src/LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-NonCommercial 2.5 Generic License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 2 | 3 | -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/accessing_a_protected_member_from_outside_the_class.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/accessing_a_protected_member_from_outside_the_class.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/assigning_a_lambda_to_a_variable.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/assigning_a_lambda_to_a_variable.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/assigning_to_builtin.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/assigning_to_builtin.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/bad_except_clauses_order.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/bad_except_clauses_order.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/bad_first_argument_given_to_super.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/bad_first_argument_given_to_super.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/else_clause_on_loop_without_a_break_statement.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/else_clause_on_loop_without_a_break_statement.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/exit_must_accept_three_arguments.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/exit_must_accept_three_arguments.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/explicit_return_in_init.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/explicit_return_in_init.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/future_import_is_not_the_first_statement.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/future_import_is_not_the_first_statement.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/implementing_java-style_getters_and_setters.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/implementing_java-style_getters_and_setters.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/indentation_contains_mixed_spaces_and_tabs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/indentation_contains_mixed_spaces_and_tabs.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/indentation_contains_tabs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/indentation_contains_tabs.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/method_could_be_a_function.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/method_could_be_a_function.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/method_has_no_argument.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/method_has_no_argument.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/missing_argument_to_super.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/missing_argument_to_super.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/mutable_default_value_as_argument.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/mutable_default_value_as_argument.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/no_exception_type_specified.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/no_exception_type_specified.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_defaultdict.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_defaultdict.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_else_in_a_loop.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_else_in_a_loop.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_explicit_unpacking.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_explicit_unpacking.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_get_to_return_a_default_value_from_a_dictionary.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_get_to_return_a_default_value_from_a_dictionary.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_setdefault_to_initialize_a_dictionary.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_setdefault_to_initialize_a_dictionary.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/not_using_useless_classes.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/not_using_useless_classes.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/correctness/working_with_json.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/correctness/working_with_json.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/migration/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/migration/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/migration/template_debug_deprecated.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/migration/template_debug_deprecated.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/migration/template_dirs_deprecated.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/migration/template_dirs_deprecated.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/migration/template_loaders_deprecated.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/migration/template_loaders_deprecated.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/1.8/migration/template_string_if_invalid_deprecated.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/1.8/migration/template_string_if_invalid_deprecated.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/correctness/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/correctness/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/correctness/not_using_forward_slashes.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/correctness/not_using_forward_slashes.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/correctness/not_using_null_boolean_field.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/correctness/not_using_null_boolean_field.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/maintainability/importing_django_model_fields.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/maintainability/importing_django_model_fields.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/maintainability/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/maintainability/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/performance/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/performance/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/performance/inefficient_database_queries.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/performance/inefficient_database_queries.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/security/allowed_hosts_setting_missing.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/security/allowed_hosts_setting_missing.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/security/django_secrect_key_published.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/security/django_secrect_key_published.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/security/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/security/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/security/same_value_for_media_root_and_static_root.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/security/same_value_for_media_root_and_static_root.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/all/security/same_value_for_media_url_and_static_url.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/all/security/same_value_for_media_url_and_static_url.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/django/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/django/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /src/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/dynamically_creating_names.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/dynamically_creating_names.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/from_module_import_all_used.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/from_module_import_all_used.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/not_using_with_to_open_files.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/not_using_with_to_open_files.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/returning_more_than_one_variable_type_from_function_call.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/returning_more_than_one_variable_type_from_function_call.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/using_single_letter_as_variable_name.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/using_single_letter_as_variable_name.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/maintainability/using_the_global_statement.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/maintainability/using_the_global_statement.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/performance/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/performance/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/performance/not_using_iteritems_to_iterate_large_dict.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/performance/not_using_iteritems_to_iterate_large_dict.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/performance/using_key_in_list_to_check_if_key_is_contained_in_a_list.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/performance/using_key_in_list_to_check_if_key_is_contained_in_a_list.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/asking_for_permission_instead_of_forgiveness_when_working_with_files.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/asking_for_permission_instead_of_forgiveness_when_working_with_files.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/comparison_to_none.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/comparison_to_none.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/comparison_to_true.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/comparison_to_true.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/do_not_compare_types_use_isinstance.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/do_not_compare_types_use_isinstance.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_a_dict_comprehension.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_a_dict_comprehension.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_dict_keys_when_formatting_strings.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_dict_keys_when_formatting_strings.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_if_to_switch.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_if_to_switch.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_items_to_iterate_over_a_dictionary.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_items_to_iterate_over_a_dictionary.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_named_tuples_when_returning_more_than_one_value.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_named_tuples_when_returning_more_than_one_value.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_unpacking_for_updating_multiple_values_at_once.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_unpacking_for_updating_multiple_values_at_once.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/not_using_zip_to_iterate_over_a_pair_of_lists.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/not_using_zip_to_iterate_over_a_pair_of_lists.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/putting_type_information_in_a_variable_name.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/putting_type_information_in_a_variable_name.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/test_for_object_identity_should_be_is_not.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/test_for_object_identity_should_be_is_not.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/using_an_unpythonic_loop.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/using_an_unpythonic_loop.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/using_camelcase_in_function_names.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/using_camelcase_in_function_names.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/readability/using_map_or_filter_where_list_comprehension_is_possible.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/readability/using_map_or_filter_where_list_comprehension_is_possible.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/security/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/security/index.doctree -------------------------------------------------------------------------------- /src/_build/doctrees/security/use_of_exec.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/doctrees/security/use_of_exec.doctree -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 27267cf812bdf82566ae2a288bc0e42a 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_images/snake_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_images/snake_warning.png -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/correctness/accessing_a_protected_member_from_outside_the_class.rst.txt: -------------------------------------------------------------------------------- 1 | Accessing a protected member from outside the class 2 | =================================================== 3 | 4 | Accessing a protected member (a member prefixed with ``_``) of a class from outside that class usually 5 | calls for trouble, since the creator of that class did not intend this member to be exposed. 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | class Rectangle(object): 13 | def __init__(self, width, height): 14 | self._width = width 15 | self._height = height 16 | 17 | r = Rectangle(5, 6) 18 | # direct access of protected member 19 | print("Width: {:d}".format(r._width)) 20 | 21 | Best practice 22 | ------------- 23 | 24 | If you are absolutely sure that you need to access the protected member from the outside, 25 | do the following: 26 | 27 | * Make sure that accessing the member from outside the class does not cause any inadvertent side effects. 28 | * Refactor it such that it becomes part of the public interface of the class. 29 | 30 | References 31 | ---------- 32 | 33 | - PyLint - W0212, protected-access 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/correctness/indentation_contains_tabs.rst.txt: -------------------------------------------------------------------------------- 1 | Indentation contains tabs 2 | ========================= 3 | 4 | Per the PEP 8 Style Guide, all Python code should be consistently indented with 4 spaces for each level of indentation, not tabs. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The following code uses tabs for indentation. Python code should be indented with four spaces for each level of indentation. 10 | 11 | .. code:: python 12 | 13 | def print_hello_world(): 14 | # indented with tab 15 | print("Hello, World!") 16 | def print_goodbye_world(): 17 | # indented with tab 18 | print("Goodbye, World!") 19 | 20 | Best practice 21 | ------------- 22 | 23 | Consistently indent with spaces 24 | ............................... 25 | 26 | All Python code should be consistently indented with 4 spaces. 27 | 28 | .. code:: python 29 | 30 | def print_hello_world(): 31 | # indented with 4 spaces 32 | print("Hello, World!") 33 | def print_goodbye_world(): 34 | # indented with 4 spaces 35 | print("Goodbye, World!") 36 | 37 | 38 | References 39 | ---------- 40 | - `PEP 8 Style Guide - Tabs or Spaces? `_ 41 | - `PEP 8 Style Guide - Indentation `_ 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/correctness/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | accessing_a_protected_member_from_outside_the_class 8 | assigning_a_lambda_to_a_variable 9 | assigning_to_builtin 10 | bad_except_clauses_order 11 | bad_first_argument_given_to_super 12 | else_clause_on_loop_without_a_break_statement 13 | exit_must_accept_three_arguments 14 | explicit_return_in_init 15 | future_import_is_not_the_first_statement 16 | implementing_java-style_getters_and_setters 17 | indentation_contains_mixed_spaces_and_tabs 18 | indentation_contains_tabs 19 | method_could_be_a_function 20 | method_has_no_argument 21 | missing_argument_to_super 22 | mutable_default_value_as_argument 23 | no_exception_type_specified 24 | not_using_defaultdict 25 | not_using_else_in_a_loop 26 | not_using_explicit_unpacking 27 | not_using_get_to_return_a_default_value_from_a_dictionary 28 | not_using_setdefault_to_initialize_a_dictionary 29 | 30 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/correctness/not_using_explicit_unpacking.rst.txt: -------------------------------------------------------------------------------- 1 | Not using explicit unpacking 2 | ============================ 3 | 4 | When you see multiple variables being defined followed by an assignment to a list (e.g. ``elem0, elem1, elem2 = elems``, where ``elem0``, ``elem1``, and ``elem2`` are variables and ``elems`` is a list), Python will automatically iterate through the list and assign ``elems[0]`` to ``elem0``, ``elems[1]`` to ``elem1``, and so on. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The code below manually creates multiple variables to access the items in a list. This code is error-prone and unnecessarily verbose, as well as tedious to write. 10 | 11 | .. code:: python 12 | 13 | elems = [4, 7, 18] 14 | 15 | elem0 = elems[0] 16 | elem1 = elems[1] 17 | elem2 = elems[2] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Use unpacking 23 | ............. 24 | 25 | The modified code below is functionally equivalent to the original code, but this code is more concise and less prone to error. 26 | 27 | .. code:: python 28 | 29 | elems = [4, 7, 18] 30 | 31 | elem0, elem1, elem2 = elems 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/correctness/working_with_json.rst.txt: -------------------------------------------------------------------------------- 1 | Working with json correctly 2 | =================================================== 3 | 4 | When reading or writing json from/to a file-like object, don't use json.loads/json.dumps. The json module has respective methods to work with json from a file. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | # read from file-like 12 | with open("json_file.json") as json_file: 13 | json_string = json_file.read() 14 | dictionary = json.loads(json_string) 15 | 16 | # write to file-like 17 | dictionary = {"key": "value"} 18 | with open("json_file.json", "w") as json_file: 19 | json_string = json.dumps(dictionary) 20 | json.file.write(json_string) 21 | 22 | Best practice 23 | ------------- 24 | When read/write to file-like objects use the json respective method load/dump instead of using loads/dumps. 25 | 26 | .. code:: python 27 | 28 | # read from file-like 29 | with open("json_file") as json_file: 30 | dictionary = json.load(json_file) 31 | 32 | # write to file-like 33 | dictionary = {"key": "value"} 34 | with open("json_file.json", "w") as json_file: 35 | json.dump(dictionary, json_file) 36 | 37 | References 38 | ---------- 39 | 40 | - `http://chimera.labs.oreilly.com/books/1230000000393/ch06.html#_solution_95` 41 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/1.8/index.rst.txt: -------------------------------------------------------------------------------- 1 | 1.8 2 | === 3 | 4 | In this section, you'll find anti-patterns that apply specifically to Django 1.8. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | migration/index 10 | 11 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/1.8/migration/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`magic` Migration to 1.8 2 | =========================== 3 | 4 | Migrating to a new Django version can be time consuming. To make this process easier, this chapter lists deprecated features and shows potential migration patterns/pathes. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | template_dirs_deprecated 10 | template_debug_deprecated 11 | template_loaders_deprecated 12 | template_string_if_invalid_deprecated 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/correctness/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | not_using_forward_slashes 8 | not_using_null_boolean_field 9 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/index.rst.txt: -------------------------------------------------------------------------------- 1 | All (recent) versions 2 | ===================== 3 | 4 | This chapter contains anti- and migration patterns that apply to all (recent) Django version. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | maintainability/index 10 | security/index 11 | correctness/index 12 | performance/index 13 | 14 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/maintainability/importing_django_model_fields.rst.txt: -------------------------------------------------------------------------------- 1 | Importing django.db.models.fields 2 | ================================= 3 | 4 | In Django, models are defined in ``django.db.models.fields``. However, for convenience they are imported into ``django.db.models``. Django's standard convention is to use ``from django.db import models`` and refer to fields as ``modelsField``. To improve readability and maintainability of your code, change your import statement and model definition. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | from django.db.models import fields 12 | 13 | class Person(models.Model): 14 | first_name = fields.CharField(max_length=30) 15 | last_name = fields.CharField(max_length=30) 16 | 17 | Best practice 18 | ------------- 19 | 20 | Stick to standard conventions and use ``from django.db import models`` instead. 21 | 22 | .. code:: python 23 | 24 | from django.db import models 25 | 26 | class Person(models.Model): 27 | first_name = models.CharField(max_length=30) 28 | last_name = models.CharField(max_length=30) 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Model field reference `_ 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/maintainability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | Avoid the following anti-patterns to increase maintainability of your Django code base—for you, and for others. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | importing_django_model_fields 10 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/performance/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | Django has a lot of mechanisms built-in to build fast and efficient web applications. Still, there are several things to watch out for, especially when you start to scale your Django application. This chapter contains anti-patterns that can potentially harm the performance of your application and hence, should be avoided. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | inefficient_database_queries 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/security/allowed_hosts_setting_missing.rst.txt: -------------------------------------------------------------------------------- 1 | ALLOWED_HOSTS setting missing 2 | ============================= 3 | 4 | In Django, you need to properly set the ``ALLOWED_HOSTS`` setting when ``DEBUG = False``. This is a security mechanism. It prevents attackers from poisoning caches or password reset emails with links to malicious hosts by submitting requests with a fake HTTP Host header, which is possible even under many seemingly-safe web server configurations. 5 | 6 | Anti-Pattern 7 | ------------ 8 | 9 | ``ALLOWED_HOSTS`` not set or empty, when ``DEBUG = False``. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | DEBUG = False 16 | # ... 17 | ALLOWED_HOSTS = [] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Make sure, an appropriate host is set in `ALLOWED_HOSTS`, whenever `DEBUG = False`. 23 | 24 | .. code:: python 25 | 26 | DEBUG = False 27 | # ... 28 | ALLOWED_HOSTS = ['djangoproject.com'] 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Settings: The Basics `_ 34 | - `Django documentation - Settings: ALLOWED_HOSTS `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/security/django_secrect_key_published.rst.txt: -------------------------------------------------------------------------------- 1 | SECRET_KEY published 2 | ==================== 3 | 4 | A secret key has to be be kept secret. Make sure it is only used in production, but nowhere else. Especially, avoid committing it to source control. This increases security and makes it less likely that an attacker may acquire the key. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | This settings.py contains a SECRET_KEY. You should not do this! 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 15 | 16 | Better Practices 17 | ---------------- 18 | Load key from environment variable 19 | .................................. 20 | 21 | Instead of publishing your secret key, you can use an environment variable to set your secret key. 22 | 23 | .. code:: python 24 | 25 | import os 26 | SECRET_KEY = os.environ['SECRET_KEY'] 27 | 28 | 29 | Load secret key from file 30 | ......................... 31 | 32 | Alternatively, you can read the secret key from a file. 33 | 34 | .. code:: python 35 | 36 | with open('/etc/secret_key.txt') as f: 37 | SECRET_KEY = f.read().strip() 38 | 39 | References 40 | ----------- 41 | - `Django `_ 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/security/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Most Django applications contain a lot of proprietory or even confidential information. Hence, it is crucial to take all possible measures to take your Django application secure and to recude the possibility of being hacked. 5 | 6 | Use the following patterns to increase the security of your code. 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | 11 | allowed_hosts_setting_missing 12 | django_secrect_key_published 13 | same_value_for_media_root_and_static_root 14 | same_value_for_media_url_and_static_url 15 | 16 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/security/same_value_for_media_root_and_static_root.rst.txt: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_ROOT and STATIC_ROOT 2 | ========================================= 3 | 4 | According to Django's documentation, ``MEDIA_ROOT`` and ``STATIC_ROOT`` must have different values. Before STATIC_ROOT was introduced, ``MEDIA_ROOT`` was also used (as fallback) to also serve static files. As this can have serious security implications, Django has validation checks to prevent it. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_ROOT`` and ``STATIC_ROOT`` point to the same folder. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_ROOT = '/path/to/my/static/files' 17 | MEDIA_ROOT = '/path/to/my/static/files' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, ``STATIC_ROOT`` and ``MEDIA_ROOT`` point to different folders. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_ROOT = '/path/to/my/static/files' 29 | MEDIA_ROOT = '/path/to/my/media/files' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_ROOT `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/django/all/security/same_value_for_media_url_and_static_url.rst.txt: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_URL and STATIC_URL 2 | ======================================= 3 | 4 | According to Django's documentation, ``MEDIA_URL`` and ``STATIC_URL`` must have different values. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_URL`` and ``STATIC_URL`` point to the same URL. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_URL = 'http://www.mysite.com/static' 17 | MEDIA_URL = 'http://www.mysite.com/static' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, `STATIC_URL` and `MEDIA_URL` point to different URL's. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_URL = 'http://www.mysite.com/static' 29 | MEDIA_URL = 'http://www.mysite.com/media' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_URL `_ 35 | - `Django documentation - Settings: MEDIA_ROOT `_ 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/maintainability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | A program is **maintainable** if it is easy to understand and modify the code even for someone 5 | that is unfamiliar with the code base. 6 | 7 | Avoid the following anti-patterns to increase maintainability and avoid creating `spaghetti code`. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | from_module_import_all_used 13 | not_using_with_to_open_files 14 | returning_more_than_one_variable_type_from_function_call 15 | using_the_global_statement 16 | using_single_letter_as_variable_name 17 | dynamically_creating_names 18 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/performance/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | In Python, large performance gains can be obtained by using appropriate functions and directives. 5 | Avoid the following anti-patterns to reduce overhead and make your code more performant. 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | using_key_in_list_to_check_if_key_is_contained_in_a_list 11 | not_using_iteritems_to_iterate_large_dict 12 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/readability/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`eye` Readability 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | asking_for_permission_instead_of_forgiveness_when_working_with_files 8 | comparison_to_none 9 | comparison_to_true 10 | do_not_compare_types_use_isinstance 11 | not_using_a_dict_comprehension 12 | not_using_dict_keys_when_formatting_strings 13 | not_using_items_to_iterate_over_a_dictionary 14 | not_using_named_tuples_when_returning_more_than_one_value 15 | not_using_unpacking_for_updating_multiple_values_at_once 16 | not_using_zip_to_iterate_over_a_pair_of_lists 17 | putting_type_information_in_a_variable_name 18 | test_for_object_identity_should_be_is_not 19 | using_an_unpythonic_loop 20 | using_map_or_filter_where_list_comprehension_is_possible 21 | using_camelcase_in_function_names 22 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/readability/using_camelcase_in_function_names.rst.txt: -------------------------------------------------------------------------------- 1 | Using `CamelCase` in function names 2 | =================================== 3 | 4 | Per the PEP 8 Style Guide, function names should be lowercase, with words separated by underscores. 5 | 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | def someFunction(): 13 | print("Is not the preferred PEP 8 pattern for function names") 14 | 15 | Best practice 16 | ------------- 17 | 18 | Using lowercase with underscores 19 | ................................ 20 | 21 | The code below uses the PEP 8 preferred pattern of function names. 22 | 23 | .. code:: python 24 | 25 | def some_function(): 26 | print("PEP 8 Style Guide prefers this pattern") 27 | 28 | References 29 | ---------- 30 | - `PEP8 Style Guide - Function names `_ 31 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_sources/security/index.rst.txt: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Python is a highly dynamic language that gives the programmer many ways to change the runtime 5 | behavior of his code and even dynamically execute new code. This is powerful but can be a security 6 | risk as well. 7 | 8 | Use the following patterns to increase the security of your code. 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | use_of_exec 14 | 15 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/font-awesome-4.1.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/menu.css: -------------------------------------------------------------------------------- 1 | .toctree-wrapper ul li.toctree-l1 2 | { 3 | font-size:22px; 4 | margin-bottom:10px; 5 | margin-left:0px; 6 | list-style-type: none !important; 7 | } 8 | .toctree-wrapper li.toctree-l2 9 | { 10 | list-style:none !important; 11 | font-size:14px; 12 | margin-bottom:3px; 13 | margin-top:3px; 14 | } -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/css/ribbon.css: -------------------------------------------------------------------------------- 1 | @media(max-width:768px) 2 | { 3 | .github_ribbon 4 | { 5 | display:none; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false 11 | }; -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/file.png -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/minus.png -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/_static/plus.png -------------------------------------------------------------------------------- /src/_build/html/python-anti-patterns/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_build/html/python-anti-patterns/objects.inv -------------------------------------------------------------------------------- /src/_themes/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.pyo 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /src/_themes/README: -------------------------------------------------------------------------------- 1 | Flask Sphinx Styles 2 | =================== 3 | 4 | This repository contains sphinx styles for Flask and Flask related 5 | projects. To use this style in your Sphinx documentation, follow 6 | this guide: 7 | 8 | 1. put this folder as _themes into your docs folder. Alternatively 9 | you can also use git submodules to check out the contents there. 10 | 2. add this to your conf.py: 11 | 12 | sys.path.append(os.path.abspath('_themes')) 13 | html_theme_path = ['_themes'] 14 | html_theme = 'flask' 15 | 16 | The following themes exist: 17 | 18 | - 'flask' - the standard flask documentation theme for large 19 | projects 20 | - 'flask_small' - small one-page theme. Intended to be used by 21 | very small addon libraries for flask. 22 | 23 | The following options exist for the flask_small theme: 24 | 25 | [options] 26 | index_logo = '' filename of a picture in _static 27 | to be used as replacement for the 28 | h1 in the index.rst file. 29 | index_logo_height = 120px height of the index logo 30 | github_fork = '' repository name on github for the 31 | "fork me" badge 32 | -------------------------------------------------------------------------------- /src/_themes/flask/layout.html: -------------------------------------------------------------------------------- 1 | {%- extends "basic/layout.html" %} 2 | {%- block extrahead %} 3 | {{ super() }} 4 | 5 | {% if theme_touch_icon %} 6 | 7 | {% endif %} 8 | 9 | {% endblock %} 10 | {%- block relbar2 %}{% endblock %} 11 | {% block header %} 12 | {{ super() }} 13 | {% if pagename == 'index' %} 14 |
15 | {% endif %} 16 | {% endblock %} 17 | {%- block footer %} 18 | 22 | {% if pagename == 'index' %} 23 |
24 | {% endif %} 25 | {%- endblock %} 26 | -------------------------------------------------------------------------------- /src/_themes/flask/relations.html: -------------------------------------------------------------------------------- 1 |

Related Topics

2 | 20 | -------------------------------------------------------------------------------- /src/_themes/flask/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = flasky.css 4 | pygments_style = flask_theme_support.FlaskyStyle 5 | 6 | [options] 7 | index_logo = '' 8 | index_logo_height = 120px 9 | touch_icon = 10 | -------------------------------------------------------------------------------- /src/_themes/flask_small/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "basic/layout.html" %} 2 | {% block header %} 3 | {{ super() }} 4 | {% if pagename == 'index' %} 5 |
6 | {% endif %} 7 | {% endblock %} 8 | {% block footer %} 9 | {% if pagename == 'index' %} 10 |
11 | {% endif %} 12 | {% endblock %} 13 | {# do not display relbars #} 14 | {% block relbar1 %}{% endblock %} 15 | {% block relbar2 %} 16 | {% if theme_github_fork %} 17 | Fork me on GitHub 19 | {% endif %} 20 | {% endblock %} 21 | {% block sidebar1 %}{% endblock %} 22 | {% block sidebar2 %}{% endblock %} 23 | -------------------------------------------------------------------------------- /src/_themes/flask_small/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = flasky.css 4 | nosidebar = true 5 | pygments_style = flask_theme_support.FlaskyStyle 6 | 7 | [options] 8 | index_logo = '' 9 | index_logo_height = 120px 10 | github_fork = '' 11 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/__init__.py: -------------------------------------------------------------------------------- 1 | """Sphinx ReadTheDocs theme. 2 | 3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme. 4 | 5 | """ 6 | import os 7 | 8 | VERSION = (0, 1, 5) 9 | 10 | __version__ = ".".join(str(v) for v in VERSION) 11 | __version_full__ = __version__ 12 | 13 | 14 | def get_html_theme_path(): 15 | """Return list of HTML theme paths.""" 16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | return cur_dir 18 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/footer.html: -------------------------------------------------------------------------------- 1 |
2 | {% if next or prev %} 3 | 11 | {% endif %} 12 | 13 |
14 | 15 |
16 |

17 |

18 |
19 | 20 | 21 | {% trans %}Sphinx theme provided by Read the Docs - Last updated: {{last_updated}} {% endtrans %} 22 |
23 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/searchbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/font-awesome-4.1.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/menu.css: -------------------------------------------------------------------------------- 1 | .toctree-wrapper ul li.toctree-l1 2 | { 3 | font-size:22px; 4 | margin-bottom:10px; 5 | margin-left:0px; 6 | list-style-type: none !important; 7 | } 8 | .toctree-wrapper li.toctree-l2 9 | { 10 | list-style:none !important; 11 | font-size:14px; 12 | margin-bottom:3px; 13 | margin-top:3px; 14 | } -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/css/ribbon.css: -------------------------------------------------------------------------------- 1 | @media(max-width:768px) 2 | { 3 | .github_ribbon 4 | { 5 | display:none; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/1YwB1sO8YE1Lyjf12WNiUA.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/AIed271kqQlcIRSOnQH0yejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCCYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCI4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/BjAYBlHtW3CJxDcjzrnZCL6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/H2DMvhDLycM56KNuAtbJYA.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/UyBMtLsHKBKXelqf4x7VRQ.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJQalQocB-__pDVGhF3uS2Ks.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJSFaMxiho_5XQnyRZzQsrZs.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJS_vZmeiCMnoWNN9rHBYaTc.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJWhQUTDJGru-0vvUpABgH8I.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJYlIZu-HDpmDIZMigmsroc4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJZ6iIh_FvlUHQwED9Yt5Kbw.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/dazS1PrQQuCxC3iOAJFEJejkDdvhIIFj_YMdgqpnSB0.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZiYE0-AqJ3nfInTTiDXDjU4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZjTOQ_MqJVwkKsUn0wKzc2I.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZjUj_cnvWIuuBMVgbX098Mw.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37ZkbcKLIaa1LC45dFaAfauRA.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zmo_sUJ8uO4YLWRInS22T3Y.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zo4P5ICox8Kq3LLUNMylGO4.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/quantifiedcode/static/fonts/y7lebkjgREBJK96VQi37Zr6up8jxqWt8HVA3mDhkV_0.woff2 -------------------------------------------------------------------------------- /src/_themes/quantifiedcode/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | 5 | [options] 6 | typekit_id = hiw1hhg 7 | analytics_id = 8 | sticky_navigation = False 9 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/__init__.py: -------------------------------------------------------------------------------- 1 | """Sphinx ReadTheDocs theme. 2 | 3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme. 4 | 5 | """ 6 | import os 7 | 8 | VERSION = (0, 1, 5) 9 | 10 | __version__ = ".".join(str(v) for v in VERSION) 11 | __version_full__ = __version__ 12 | 13 | 14 | def get_html_theme_path(): 15 | """Return list of HTML theme paths.""" 16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | return cur_dir 18 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/breadcrumbs.html: -------------------------------------------------------------------------------- 1 |
2 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/footer.html: -------------------------------------------------------------------------------- 1 |
2 | {% if next or prev %} 3 | 11 | {% endif %} 12 | 13 |
14 | 15 |
16 |

17 |

18 |
19 | 20 | {% trans %}Sphinx theme provided by Read the Docs - Last updated: {{ last_updated }} {% endtrans %} 21 |
22 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/searchbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/font-awesome-4.1.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/menu.css: -------------------------------------------------------------------------------- 1 | .toctree-wrapper ul li.toctree-l1 2 | { 3 | list-style:none !important; 4 | font-size:22px; 5 | margin-bottom:10px; 6 | margin-left:0; 7 | } 8 | 9 | .toctree-wrapper li.toctree-l2 10 | { 11 | list-style:none !important; 12 | font-size:14px; 13 | margin-bottom:3px; 14 | margin-top:3px; 15 | } -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/css/ribbon.css: -------------------------------------------------------------------------------- 1 | @media(max-width:768px) 2 | { 3 | .github_ribbon 4 | { 5 | display:none; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/_themes/sphinx_rtd_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | 5 | [options] 6 | typekit_id = hiw1hhg 7 | analytics_id = 8 | sticky_navigation = False 9 | -------------------------------------------------------------------------------- /src/correctness/accessing_a_protected_member_from_outside_the_class.rst: -------------------------------------------------------------------------------- 1 | Accessing a protected member from outside the class 2 | =================================================== 3 | 4 | Accessing a protected member (a member prefixed with ``_``) of a class from outside that class usually 5 | calls for trouble, since the creator of that class did not intend this member to be exposed. 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | class Rectangle(object): 13 | def __init__(self, width, height): 14 | self._width = width 15 | self._height = height 16 | 17 | r = Rectangle(5, 6) 18 | # direct access of protected member 19 | print("Width: {:d}".format(r._width)) 20 | 21 | Best practice 22 | ------------- 23 | 24 | If you are absolutely sure that you need to access the protected member from the outside, 25 | do the following: 26 | 27 | * Make sure that accessing the member from outside the class does not cause any inadvertent side effects. 28 | * Refactor it such that it becomes part of the public interface of the class. 29 | 30 | References 31 | ---------- 32 | 33 | - PyLint - W0212, protected-access 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/correctness/indentation_contains_tabs.rst: -------------------------------------------------------------------------------- 1 | Indentation contains tabs 2 | ========================= 3 | 4 | Per the PEP 8 Style Guide, all Python code should be consistently indented with 4 spaces for each level of indentation, not tabs. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The following code uses tabs for indentation. Python code should be indented with four spaces for each level of indentation. 10 | 11 | .. code:: python 12 | 13 | def print_hello_world(): 14 | # indented with tab 15 | print("Hello, World!") 16 | def print_goodbye_world(): 17 | # indented with tab 18 | print("Goodbye, World!") 19 | 20 | Best practice 21 | ------------- 22 | 23 | Consistently indent with spaces 24 | ............................... 25 | 26 | All Python code should be consistently indented with 4 spaces. 27 | 28 | .. code:: python 29 | 30 | def print_hello_world(): 31 | # indented with 4 spaces 32 | print("Hello, World!") 33 | def print_goodbye_world(): 34 | # indented with 4 spaces 35 | print("Goodbye, World!") 36 | 37 | 38 | References 39 | ---------- 40 | - `PEP 8 Style Guide - Tabs or Spaces? `_ 41 | - `PEP 8 Style Guide - Indentation `_ 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/correctness/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | accessing_a_protected_member_from_outside_the_class 8 | assigning_a_lambda_to_a_variable 9 | assigning_to_builtin 10 | bad_except_clauses_order 11 | bad_first_argument_given_to_super 12 | else_clause_on_loop_without_a_break_statement 13 | exit_must_accept_three_arguments 14 | explicit_return_in_init 15 | future_import_is_not_the_first_statement 16 | implementing_java-style_getters_and_setters 17 | indentation_contains_mixed_spaces_and_tabs 18 | indentation_contains_tabs 19 | method_could_be_a_function 20 | method_has_no_argument 21 | missing_argument_to_super 22 | mutable_default_value_as_argument 23 | no_exception_type_specified 24 | not_using_defaultdict 25 | not_using_else_in_a_loop 26 | not_using_explicit_unpacking 27 | not_using_get_to_return_a_default_value_from_a_dictionary 28 | not_using_setdefault_to_initialize_a_dictionary 29 | 30 | -------------------------------------------------------------------------------- /src/correctness/not_using_explicit_unpacking.rst: -------------------------------------------------------------------------------- 1 | Not using explicit unpacking 2 | ============================ 3 | 4 | When you see multiple variables being defined followed by an assignment to a list (e.g. ``elem0, elem1, elem2 = elems``, where ``elem0``, ``elem1``, and ``elem2`` are variables and ``elems`` is a list), Python will automatically iterate through the list and assign ``elems[0]`` to ``elem0``, ``elems[1]`` to ``elem1``, and so on. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | The code below manually creates multiple variables to access the items in a list. This code is error-prone and unnecessarily verbose, as well as tedious to write. 10 | 11 | .. code:: python 12 | 13 | elems = [4, 7, 18] 14 | 15 | elem0 = elems[0] 16 | elem1 = elems[1] 17 | elem2 = elems[2] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Use unpacking 23 | ............. 24 | 25 | The modified code below is functionally equivalent to the original code, but this code is more concise and less prone to error. 26 | 27 | .. code:: python 28 | 29 | elems = [4, 7, 18] 30 | 31 | elem0, elem1, elem2 = elems 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/correctness/not_using_useless_classes.rst: -------------------------------------------------------------------------------- 1 | Don't use just class 2 | ==================== 3 | 4 | When you have a method that doesn't really needs a class to belong, don't create a new class just to put it inside. In Python we can create methods that don't belong to class. 5 | 6 | Anti-Pattern 7 | ------------ 8 | 9 | The ``DateUtil`` class below has the ``convert`` method that transforms a weekday from datetime to weekday in string form. 10 | 11 | .. code:: python 12 | 13 | class DateUtil: 14 | @staticmethod 15 | def from_weekday_to_string(weekday): 16 | nameds_weekdays = { 17 | 0: 'Monday', 18 | 5: 'Friday' 19 | } 20 | return nameds_weekdays[weekday] 21 | 22 | It's not necessary create a class to do this. You could just create a new file to put it, or put it in an existing one. 23 | 24 | Best Practice 25 | ------------- 26 | Puting the method outside of the class 27 | ...................................... 28 | 29 | It is usually easier to write just one simple method. This makes the overhead of w whole class unnecessary. 30 | 31 | .. code:: python 32 | 33 | def from_weekday_to_string(weekday): 34 | nameds_weekdays = { 35 | 0: 'Monday', 36 | 5: 'Friday' 37 | } 38 | return nameds_weekdays[weekday] 39 | 40 | -------------------------------------------------------------------------------- /src/correctness/working_with_json.rst: -------------------------------------------------------------------------------- 1 | Working with json correctly 2 | =================================================== 3 | 4 | When reading or writing json from/to a file-like object, don't use json.loads/json.dumps. The json module has respective methods to work with json from a file. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | # read from file-like 12 | with open("json_file.json") as json_file: 13 | json_string = json_file.read() 14 | dictionary = json.loads(json_string) 15 | 16 | # write to file-like 17 | dictionary = {"key": "value"} 18 | with open("json_file.json", "w") as json_file: 19 | json_string = json.dumps(dictionary) 20 | json.file.write(json_string) 21 | 22 | Best practice 23 | ------------- 24 | When read/write to file-like objects use the json respective method load/dump instead of using loads/dumps. 25 | 26 | .. code:: python 27 | 28 | # read from file-like 29 | with open("json_file") as json_file: 30 | dictionary = json.load(json_file) 31 | 32 | # write to file-like 33 | dictionary = {"key": "value"} 34 | with open("json_file.json", "w") as json_file: 35 | json.dump(dictionary, json_file) 36 | 37 | References 38 | ---------- 39 | 40 | - `http://chimera.labs.oreilly.com/books/1230000000393/ch06.html#_solution_95` 41 | -------------------------------------------------------------------------------- /src/django/1.8/index.rst: -------------------------------------------------------------------------------- 1 | 1.8 2 | === 3 | 4 | In this section, you'll find anti-patterns that apply specifically to Django 1.8. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | migration/index 10 | 11 | -------------------------------------------------------------------------------- /src/django/1.8/migration/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`magic` Migration to 1.8 2 | =========================== 3 | 4 | Migrating to a new Django version can be time consuming. To make this process easier, this chapter lists deprecated features and shows potential migration patterns/pathes. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | template_dirs_deprecated 10 | template_debug_deprecated 11 | template_loaders_deprecated 12 | template_string_if_invalid_deprecated 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/django/all/correctness/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`check` Correctness 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | not_using_forward_slashes 8 | not_using_null_boolean_field 9 | -------------------------------------------------------------------------------- /src/django/all/index.rst: -------------------------------------------------------------------------------- 1 | All (recent) versions 2 | ===================== 3 | 4 | This chapter contains anti- and migration patterns that apply to all (recent) Django version. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | maintainability/index 10 | security/index 11 | correctness/index 12 | performance/index 13 | 14 | -------------------------------------------------------------------------------- /src/django/all/maintainability/importing_django_model_fields.rst: -------------------------------------------------------------------------------- 1 | Importing django.db.models.fields 2 | ================================= 3 | 4 | In Django, models are defined in ``django.db.models.fields``. However, for convenience they are imported into ``django.db.models``. Django's standard convention is to use ``from django.db import models`` and refer to fields as ``modelsField``. To improve readability and maintainability of your code, change your import statement and model definition. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | .. code:: python 10 | 11 | from django.db.models import fields 12 | 13 | class Person(models.Model): 14 | first_name = fields.CharField(max_length=30) 15 | last_name = fields.CharField(max_length=30) 16 | 17 | Best practice 18 | ------------- 19 | 20 | Stick to standard conventions and use ``from django.db import models`` instead. 21 | 22 | .. code:: python 23 | 24 | from django.db import models 25 | 26 | class Person(models.Model): 27 | first_name = models.CharField(max_length=30) 28 | last_name = models.CharField(max_length=30) 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Model field reference `_ 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/django/all/maintainability/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | Avoid the following anti-patterns to increase maintainability of your Django code base—for you, and for others. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | importing_django_model_fields 10 | -------------------------------------------------------------------------------- /src/django/all/performance/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | Django has a lot of mechanisms built-in to build fast and efficient web applications. Still, there are several things to watch out for, especially when you start to scale your Django application. This chapter contains anti-patterns that can potentially harm the performance of your application and hence, should be avoided. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | inefficient_database_queries 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/django/all/security/allowed_hosts_setting_missing.rst: -------------------------------------------------------------------------------- 1 | ALLOWED_HOSTS setting missing 2 | ============================= 3 | 4 | In Django, you need to properly set the ``ALLOWED_HOSTS`` setting when ``DEBUG = False``. This is a security mechanism. It prevents attackers from poisoning caches or password reset emails with links to malicious hosts by submitting requests with a fake HTTP Host header, which is possible even under many seemingly-safe web server configurations. 5 | 6 | Anti-Pattern 7 | ------------ 8 | 9 | ``ALLOWED_HOSTS`` not set or empty, when ``DEBUG = False``. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | DEBUG = False 16 | # ... 17 | ALLOWED_HOSTS = [] 18 | 19 | Best practice 20 | ------------- 21 | 22 | Make sure, an appropriate host is set in `ALLOWED_HOSTS`, whenever `DEBUG = False`. 23 | 24 | .. code:: python 25 | 26 | DEBUG = False 27 | # ... 28 | ALLOWED_HOSTS = ['djangoproject.com'] 29 | 30 | References 31 | ---------- 32 | 33 | - `Django documentation - Settings: The Basics `_ 34 | - `Django documentation - Settings: ALLOWED_HOSTS `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/django/all/security/django_secrect_key_published.rst: -------------------------------------------------------------------------------- 1 | SECRET_KEY published 2 | ==================== 3 | 4 | A secret key has to be be kept secret. Make sure it is only used in production, but nowhere else. Especially, avoid committing it to source control. This increases security and makes it less likely that an attacker may acquire the key. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | This settings.py contains a SECRET_KEY. You should not do this! 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 15 | 16 | Better Practices 17 | ---------------- 18 | Load key from environment variable 19 | .................................. 20 | 21 | Instead of publishing your secret key, you can use an environment variable to set your secret key. 22 | 23 | .. code:: python 24 | 25 | import os 26 | SECRET_KEY = os.environ['SECRET_KEY'] 27 | 28 | 29 | Load secret key from file 30 | ......................... 31 | 32 | Alternatively, you can read the secret key from a file. 33 | 34 | .. code:: python 35 | 36 | with open('/etc/secret_key.txt') as f: 37 | SECRET_KEY = f.read().strip() 38 | 39 | References 40 | ----------- 41 | - `Django `_ 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/django/all/security/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Most Django applications contain a lot of proprietory or even confidential information. Hence, it is crucial to take all possible measures to take your Django application secure and to recude the possibility of being hacked. 5 | 6 | Use the following patterns to increase the security of your code. 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | 11 | allowed_hosts_setting_missing 12 | django_secrect_key_published 13 | same_value_for_media_root_and_static_root 14 | same_value_for_media_url_and_static_url 15 | 16 | -------------------------------------------------------------------------------- /src/django/all/security/same_value_for_media_root_and_static_root.rst: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_ROOT and STATIC_ROOT 2 | ========================================= 3 | 4 | According to Django's documentation, ``MEDIA_ROOT`` and ``STATIC_ROOT`` must have different values. Before STATIC_ROOT was introduced, ``MEDIA_ROOT`` was also used (as fallback) to also serve static files. As this can have serious security implications, Django has validation checks to prevent it. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_ROOT`` and ``STATIC_ROOT`` point to the same folder. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_ROOT = '/path/to/my/static/files' 17 | MEDIA_ROOT = '/path/to/my/static/files' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, ``STATIC_ROOT`` and ``MEDIA_ROOT`` point to different folders. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_ROOT = '/path/to/my/static/files' 29 | MEDIA_ROOT = '/path/to/my/media/files' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_ROOT `_ 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/django/all/security/same_value_for_media_url_and_static_url.rst: -------------------------------------------------------------------------------- 1 | Same value for MEDIA_URL and STATIC_URL 2 | ======================================= 3 | 4 | According to Django's documentation, ``MEDIA_URL`` and ``STATIC_URL`` must have different values. 5 | 6 | Anti-pattern 7 | ------------ 8 | 9 | ``MEDIA_URL`` and ``STATIC_URL`` point to the same URL. 10 | 11 | .. code:: python 12 | 13 | """ settings.py """ 14 | 15 | # Media and static root are identical 16 | STATIC_URL = 'http://www.mysite.com/static' 17 | MEDIA_URL = 'http://www.mysite.com/static' 18 | 19 | Best practice 20 | ------------- 21 | 22 | Ensure, `STATIC_URL` and `MEDIA_URL` point to different URL's. 23 | 24 | .. code:: python 25 | 26 | """ settings.py """ 27 | 28 | STATIC_URL = 'http://www.mysite.com/static' 29 | MEDIA_URL = 'http://www.mysite.com/media' 30 | 31 | References 32 | ---------- 33 | 34 | - `Django documentation - Settings: MEDIA_URL `_ 35 | - `Django documentation - Settings: MEDIA_ROOT `_ 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/django/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`book` Django 2 | ================= 3 | 4 | Django is a great framework to create fast and scalable web applications. To help you write great Django apps from the start, we started to compile a set of anti- and migration patterns. They'll help you to avoid common mistakes or to migrate to a new version faster. Some patterns are simply (more elaborate) explanations of tips and best practices that can be found in Django's docs. Others stem from our own experiences. Feel free to contribute your ideas or share your pattern via `email `_. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | all/maintainability/index 10 | all/security/index 11 | all/correctness/index 12 | all/performance/index 13 | 1.8/migration/index 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/logo_qc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/logo_qc.png -------------------------------------------------------------------------------- /src/maintainability/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`puzzle-piece` Maintainability 2 | ================================== 3 | 4 | A program is **maintainable** if it is easy to understand and modify the code even for someone 5 | that is unfamiliar with the code base. 6 | 7 | Avoid the following anti-patterns to increase maintainability and avoid creating `spaghetti code`. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | from_module_import_all_used 13 | not_using_with_to_open_files 14 | returning_more_than_one_variable_type_from_function_call 15 | using_the_global_statement 16 | using_single_letter_as_variable_name 17 | dynamically_creating_names 18 | -------------------------------------------------------------------------------- /src/performance/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`dashboard` Performance 2 | =========================== 3 | 4 | In Python, large performance gains can be obtained by using appropriate functions and directives. 5 | Avoid the following anti-patterns to reduce overhead and make your code more performant. 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | using_key_in_list_to_check_if_key_is_contained_in_a_list 11 | not_using_iteritems_to_iterate_large_dict 12 | -------------------------------------------------------------------------------- /src/readability/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`eye` Readability 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | asking_for_permission_instead_of_forgiveness_when_working_with_files 8 | comparison_to_none 9 | comparison_to_true 10 | do_not_compare_types_use_isinstance 11 | not_using_a_dict_comprehension 12 | not_using_dict_keys_when_formatting_strings 13 | not_using_items_to_iterate_over_a_dictionary 14 | not_using_named_tuples_when_returning_more_than_one_value 15 | not_using_unpacking_for_updating_multiple_values_at_once 16 | not_using_zip_to_iterate_over_a_pair_of_lists 17 | putting_type_information_in_a_variable_name 18 | test_for_object_identity_should_be_is_not 19 | using_an_unpythonic_loop 20 | using_map_or_filter_where_list_comprehension_is_possible 21 | using_camelcase_in_function_names 22 | -------------------------------------------------------------------------------- /src/readability/using_camelcase_in_function_names.rst: -------------------------------------------------------------------------------- 1 | Using `CamelCase` in function names 2 | =================================== 3 | 4 | Per the PEP 8 Style Guide, function names should be lowercase, with words separated by underscores. 5 | 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | def someFunction(): 13 | print("Is not the preferred PEP 8 pattern for function names") 14 | 15 | Best practice 16 | ------------- 17 | 18 | Using lowercase with underscores 19 | ................................ 20 | 21 | The code below uses the PEP 8 preferred pattern of function names. 22 | 23 | .. code:: python 24 | 25 | def some_function(): 26 | print("PEP 8 Style Guide prefers this pattern") 27 | 28 | References 29 | ---------- 30 | - `PEP8 Style Guide - Function names `_ 31 | -------------------------------------------------------------------------------- /src/security/index.rst: -------------------------------------------------------------------------------- 1 | :fa:`lock` Security 2 | =================== 3 | 4 | Python is a highly dynamic language that gives the programmer many ways to change the runtime 5 | behavior of his code and even dynamically execute new code. This is powerful but can be a security 6 | risk as well. 7 | 8 | Use the following patterns to increase the security of your code. 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | use_of_exec 14 | 15 | -------------------------------------------------------------------------------- /src/snake_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantifiedcode/python-anti-patterns/f28c061354e77ca30c1cb728ebb555fd638a63cd/src/snake_warning.png -------------------------------------------------------------------------------- /templates/anti_pattern.rst: -------------------------------------------------------------------------------- 1 | 2 | -------------- 3 | 4 | Summary 5 | 6 | 7 | Anti-pattern 8 | ------------ 9 | 10 | .. code:: python 11 | 12 | 13 | Best practice(s) 14 | ---------------- 15 | 16 | Best practice 1 17 | ............... 18 | 19 | Description 20 | 21 | .. code:: python 22 | 23 | 24 | Best practice 2 25 | ............... 26 | 27 | Description 28 | 29 | .. code:: python 30 | 31 | 32 | References 33 | ---------- 34 | - `URL Description `_ 35 | -------------------------------------------------------------------------------- /templates/migration_pattern.rst: -------------------------------------------------------------------------------- 1 | 2 | -------------- 3 | 4 | Summary 5 | 6 | 7 | Deprecated feature 8 | ------------------ 9 | 10 | .. code:: python 11 | 12 | 13 | Migration path 14 | -------------- 15 | 16 | Description 17 | 18 | .. code:: python 19 | 20 | 21 | References 22 | ---------- 23 | - `URL Description `_ 24 | --------------------------------------------------------------------------------