CLN: C408 Unnecessary dict call - rewrite as a literal
See original GitHub issueThe following files contain flake8 C408 Unnecessary dict call - rewrite as a literal. Good for first time contributors. See #38078 and #38116 for how to fix them. Use flake8 [file_path]
to check for each file.
C408
- ./pandas/core/generic.py
- ./pandas/core/series.py
- ./pandas/core/frame.py
- ./pandas/core/strings/accessor.py
- ./pandas/core/dtypes/dtypes.py
- ./pandas/core/computation/pytables.py
- ./pandas/core/computation/expressions.py
- ./pandas/core/arrays/floating.py
- ./pandas/core/arrays/interval.py
- ./pandas/core/arrays/numpy_.py
- ./pandas/core/arrays/base.py
- ./pandas/core/ops/methods.py
- ./pandas/core/indexes/interval.py
- ./pandas/core/indexes/multi.py
- ./pandas/core/indexes/numeric.py
- ./pandas/core/indexes/base.py
- ./pandas/io/pytables.py
- ./pandas/tests/reshape/concat/test_datetimes.py
- ./pandas/tests/reshape/merge/test_merge.py
- ./pandas/tests/reshape/merge/test_multi.py
- ./pandas/tests/tools/test_to_numeric.py
- ./pandas/tests/resample/test_time_grouper.py
- ./pandas/tests/util/test_assert_series_equal.py
- ./pandas/tests/util/test_assert_interval_array_equal.py
- ./pandas/tests/util/test_assert_index_equal.py
- ./pandas/tests/util/test_assert_extension_array_equal.py
- ./pandas/tests/io/test_parquet.py
- ./pandas/tests/io/generate_legacy_storage_files.py
- ./pandas/tests/io/formats/test_format.py
- ./pandas/tests/io/parser/test_comment.py
- ./pandas/tests/io/parser/test_parse_dates.py
- ./pandas/tests/io/parser/test_c_parser_only.py
- ./pandas/tests/io/parser/test_dialect.py
- ./pandas/tests/io/parser/test_skiprows.py
- ./pandas/tests/io/parser/test_encoding.py
- ./pandas/tests/io/parser/test_read_fwf.py
- ./pandas/tests/io/parser/test_python_parser_only.py
- ./pandas/tests/io/parser/test_na_values.py
- ./pandas/tests/io/parser/test_usecols.py
- ./pandas/tests/io/parser/test_quoting.py
- ./pandas/tests/io/parser/test_header.py
- ./pandas/tests/io/parser/test_index_col.py
- ./pandas/tests/io/json/test_ujson.py
- ./pandas/tests/io/json/test_normalize.py
- ./pandas/tests/io/pytables/test_timezones.py
- ./pandas/tests/io/pytables/test_store.py
- ./pandas/tests/frame/test_reductions.py
- ./pandas/tests/frame/test_arithmetic.py
- ./pandas/tests/frame/methods/test_to_records.py
- ./pandas/tests/frame/methods/test_sort_values.py
- ./pandas/tests/frame/methods/test_fillna.py
- ./pandas/tests/frame/methods/test_to_csv.py
- ./pandas/tests/frame/indexing/test_indexing.py
- ./pandas/tests/frame/indexing/test_where.py
- ./pandas/tests/dtypes/test_inference.py
- ./pandas/tests/groupby/test_function.py
- ./pandas/tests/groupby/transform/test_transform.py
- ./pandas/tests/plotting/test_boxplot_method.py
- ./pandas/tests/plotting/frame/test_frame_subplots.py
- ./pandas/tests/io/parser/test_common.py
Remove ignore setting from flake8 section
- setup.cfg
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (17 by maintainers)
Top Results From Across the Web
[Solved] C408 Unnecessary (dict/list/tuple) call - rewrite as a ...
C408 Unnecessary (dict/list/tuple) call - rewrite as a literal. One of the main purposes of flake8 is to improve the list/set/dict comprehensions in...
Read more >flake8-comprehensions - PyPI
C408 : Unnecessary <dict/list/tuple> call - rewrite as a literal. It's slower to call e.g. dict() than using the empty literal, because the...
Read more >python - Is there a difference between using a dict literal and a ...
In any case I am starting to prefer the constructor syntax anyways since I find it easier to type and move code between...
Read more >A Flake8 Plugin to Help You Write Better List/set/dict ... - Morioh
C408 : Unnecessary <dict/list/tuple> call - rewrite as a literal. It's slower to call e.g. dict() than using the empty literal, because the...
Read more >Aluminium - OSCHINA - 中文开源技术交流社区
Vitamins Qty Module call BOM entry 1 pcb(PERF60x40) Perfboard 60 x 40mm 1 ax_res(res1_8, 1000) Resistor 1000 Ohms 5% 0.125W 1 ax_res(res1_8, 2200, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
close the issue when the checks are updated
Created a PR (#38180 )that addresses the following files:
./pandas/tests/reshape/concat/test_datetimes.py ./pandas/tests/reshape/merge/test_merge.py ./pandas/tests/reshape/merge/test_multi.py
@fangchenli Is a whatsnew entry necessary for such a change in the code?