The following issues were found
pandas/tests/tslibs/test_fields.py
3 issues
Line: 3
Column: 1
import numpy as np
from pandas._libs.tslibs import fields
import pandas._testing as tm
def test_fields_readonly():
# https://github.com/vaexio/vaex/issues/357
Reported by Pylint.
Line: 1
Column: 1
import numpy as np
from pandas._libs.tslibs import fields
import pandas._testing as tm
def test_fields_readonly():
# https://github.com/vaexio/vaex/issues/357
Reported by Pylint.
Line: 8
Column: 1
import pandas._testing as tm
def test_fields_readonly():
# https://github.com/vaexio/vaex/issues/357
# fields functions shouldn't raise when we pass read-only data
dtindex = np.arange(5, dtype=np.int64) * 10 ** 9 * 3600 * 24 * 32
dtindex.flags.writeable = False
Reported by Pylint.
scripts/generate_pip_deps_from_conda.py
3 issues
Line: 27
Column: 1
RENAME = {"pytables": "tables", "dask-core": "dask"}
def conda_package_to_pip(package: str):
"""
Convert a conda package to its pip equivalent.
In most cases they are the same, those are the exceptions:
- Packages that should be excluded (in `EXCLUDE`)
Reported by Pylint.
Line: 127
Column: 5
)
args = argparser.parse_args()
conda_fname = "environment.yml"
pip_fname = "requirements-dev.txt"
repo_path = pathlib.Path(__file__).parent.parent.absolute()
res = generate_pip_from_conda(
pathlib.Path(repo_path, conda_fname),
pathlib.Path(repo_path, pip_fname),
Reported by Pylint.
Line: 128
Column: 5
args = argparser.parse_args()
conda_fname = "environment.yml"
pip_fname = "requirements-dev.txt"
repo_path = pathlib.Path(__file__).parent.parent.absolute()
res = generate_pip_from_conda(
pathlib.Path(repo_path, conda_fname),
pathlib.Path(repo_path, pip_fname),
compare=args.compare,
Reported by Pylint.
pandas/tests/series/methods/test_pop.py
3 issues
Line: 1
Column: 1
from pandas import Series
import pandas._testing as tm
def test_pop():
# GH#6600
ser = Series([0, 4, 0], index=["A", "B", "C"], name=4)
result = ser.pop("B")
Reported by Pylint.
Line: 5
Column: 1
import pandas._testing as tm
def test_pop():
# GH#6600
ser = Series([0, 4, 0], index=["A", "B", "C"], name=4)
result = ser.pop("B")
assert result == 4
Reported by Pylint.
Line: 10
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
ser = Series([0, 4, 0], index=["A", "B", "C"], name=4)
result = ser.pop("B")
assert result == 4
expected = Series([0, 0], index=["A", "C"], name=4)
tm.assert_series_equal(ser, expected)
Reported by Bandit.
pandas/tests/io/parser/common/test_decimal.py
3 issues
Line: 7
Column: 1
"""
from io import StringIO
import pytest
from pandas import DataFrame
import pandas._testing as tm
Reported by Pylint.
Line: 31
Column: 1
""",
".",
",",
),
],
)
def test_1000_sep_with_decimal(all_parsers, data, thousands, decimal):
parser = all_parsers
expected = DataFrame({"A": [1, 10], "B": [2334.01, 13], "C": [5, 10.0]})
Reported by Pylint.
Line: 44
Column: 1
tm.assert_frame_equal(result, expected)
def test_euro_decimal_format(all_parsers):
parser = all_parsers
data = """Id;Number1;Number2;Text1;Text2;Number3
1;1521,1541;187101,9543;ABC;poi;4,738797819
2;121,12;14897,76;DEF;uyt;0,377320872
3;878,158;108013,434;GHI;rez;2,735694704"""
Reported by Pylint.
pandas/tests/window/__init__.py
2 issues
Line: 1
Column: 1
import pytest
pytestmark = [
# 2021-02-01 needed until numba updates their usage
pytest.mark.filterwarnings(
r"ignore:`np\.int` is a deprecated alias:DeprecationWarning"
),
]
Reported by Pylint.
Line: 1
Column: 1
import pytest
pytestmark = [
# 2021-02-01 needed until numba updates their usage
pytest.mark.filterwarnings(
r"ignore:`np\.int` is a deprecated alias:DeprecationWarning"
),
]
Reported by Pylint.
pandas/tests/io/pytables/conftest.py
2 issues
Line: 1
Column: 1
import pytest
import pandas._testing as tm
@pytest.fixture
def setup_path():
"""Fixture for setup path"""
return f"tmp.__{tm.rands(10)}__.h5"
Reported by Pylint.
Line: 1
Column: 1
import pytest
import pandas._testing as tm
@pytest.fixture
def setup_path():
"""Fixture for setup path"""
return f"tmp.__{tm.rands(10)}__.h5"
Reported by Pylint.
pandas/tests/reshape/concat/conftest.py
2 issues
Line: 1
Column: 1
import pytest
@pytest.fixture(params=[True, False])
def sort(request):
"""Boolean sort keyword for concat and DataFrame.append."""
return request.param
Reported by Pylint.
Line: 1
Column: 1
import pytest
@pytest.fixture(params=[True, False])
def sort(request):
"""Boolean sort keyword for concat and DataFrame.append."""
return request.param
Reported by Pylint.
pandas/tests/io/__init__.py
2 issues
Line: 1
Column: 1
import pytest
pytestmark = [
# fastparquet
pytest.mark.filterwarnings(
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning"
),
pytest.mark.filterwarnings(
"ignore:Block.is_categorical is deprecated:DeprecationWarning"
Reported by Pylint.
Line: 1
Column: 1
import pytest
pytestmark = [
# fastparquet
pytest.mark.filterwarnings(
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning"
),
pytest.mark.filterwarnings(
"ignore:Block.is_categorical is deprecated:DeprecationWarning"
Reported by Pylint.
pandas/tseries/api.py
2 issues
Line: 7
Column: 1
# flake8: noqa
from pandas.tseries.frequencies import infer_freq
import pandas.tseries.offsets as offsets
Reported by Pylint.
Line: 8
Column: 1
# flake8: noqa
from pandas.tseries.frequencies import infer_freq
import pandas.tseries.offsets as offsets
Reported by Pylint.
pandas/tests/series/test_validate.py
2 issues
Line: 1
Column: 1
import pytest
@pytest.mark.parametrize(
"func",
[
"reset_index",
"_set_name",
"sort_values",
Reported by Pylint.
Line: 1
Column: 1
import pytest
@pytest.mark.parametrize(
"func",
[
"reset_index",
"_set_name",
"sort_values",
Reported by Pylint.