Skip to content

Commit 96dd2a9

Browse files
topper-123jreback
authored andcommitted
CLN: remove '# -*- coding: utf-8 -*-' pattern (#26197)
1 parent 671707b commit 96dd2a9

File tree

284 files changed

+5
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+5
-438
lines changed

asv_bench/benchmarks/offset.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import warnings
32
from datetime import datetime
43

ci/code_checks.sh

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
126126
invgrep -r -E --include '*.py' "[[:space:]] pytest.raises" pandas/tests/
127127
RET=$(($RET + $?)) ; echo $MSG "DONE"
128128

129+
MSG='Check for python2-style file encodings' ; echo $MSG
130+
invgrep -R --include="*.py" --include="*.pyx" -E "# -\*- coding: utf-8 -\*-" pandas scripts
131+
RET=$(($RET + $?)) ; echo $MSG "DONE"
132+
129133
# Check for the following code in testing: `np.testing` and `np.array_equal`
130134
MSG='Check for invalid testing' ; echo $MSG
131135
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/

doc/source/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# pandas documentation build configuration file, created by
43
#

pandas/_libs/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# flake8: noqa
32

43
from .tslibs import (

pandas/_libs/algos.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/_libs/groupby.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53
from cython cimport floating

pandas/_libs/hashing.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Translated from the reference implementation
32
# at https://github.com/veorq/SipHash
43

pandas/_libs/hashtable.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
cimport cython
42

53
from cpython cimport (PyObject, Py_INCREF,

pandas/_libs/index.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import datetime, timedelta, date
32

43
import cython

pandas/_libs/indexing.pyx

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
3-
41
cdef class _NDFrameIndexerBase:
52
"""
63
A base class for _NDFrameIndexer for fast instantiation and attribute

pandas/_libs/internals.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/_libs/interval.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import numbers
32
from operator import le, lt
43

pandas/_libs/join.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/_libs/lib.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from decimal import Decimal
32
from fractions import Fraction
43
from numbers import Number

pandas/_libs/missing.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/_libs/ops.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import operator
32

43
from cpython cimport (PyObject_RichCompareBool,

pandas/_libs/properties.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from cython import Py_ssize_t
42

53
from cpython cimport (

pandas/_libs/reduction.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from distutils.version import LooseVersion
32

43
from cython import Py_ssize_t

pandas/_libs/reshape.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/_libs/sparse.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import cython
32

43
import numpy as np

pandas/_libs/tslib.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import cython
32

43
from cpython.datetime cimport (PyDateTime_Check, PyDate_Check,

pandas/_libs/tslibs/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# flake8: noqa
32

43
from .conversion import normalize_date, localize_pydatetime

pandas/_libs/tslibs/c_timestamp.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
_Timestamp is a c-defined subclass of datetime.datetime
43

pandas/_libs/tslibs/ccalendar.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# cython: boundscheck=False
32
"""
43
Cython implementations of functions resembling the stdlib calendar module

pandas/_libs/tslibs/conversion.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import cython
32

43
import numpy as np

pandas/_libs/tslibs/fields.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Functions for accessing attributes of Timestamp/datetime64/datetime-like
43
objects and arrays

pandas/_libs/tslibs/frequencies.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import re
32

43
cimport numpy as cnp

pandas/_libs/tslibs/nattype.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from cpython cimport (
42
PyObject_RichCompare,
53
Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE)

pandas/_libs/tslibs/np_datetime.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from cpython cimport Py_EQ, Py_NE, Py_GE, Py_GT, Py_LT, Py_LE
42

53
from cpython.datetime cimport (datetime, date,

pandas/_libs/tslibs/offsets.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42

53
import time

pandas/_libs/tslibs/parsing.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Parsing functions for datetime and datetime-like strings.
43
"""

pandas/_libs/tslibs/period.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import datetime
32

43
from cpython cimport (

pandas/_libs/tslibs/resolution.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import numpy as np
42
from numpy cimport ndarray, int64_t, int32_t
53

pandas/_libs/tslibs/strptime.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""Strptime-related classes and functions.
32
"""
43
import time

pandas/_libs/tslibs/timedeltas.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import collections
32
import textwrap
43
import warnings

pandas/_libs/tslibs/timestamps.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import sys
32
import warnings
43

pandas/_libs/tslibs/timezones.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import timezone
32

43
# dateutil compat

pandas/_libs/window.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# cython: boundscheck=False, wraparound=False, cdivision=True
32

43
import cython

pandas/_libs/writers.pyx

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import cython
42
from cython import Py_ssize_t
53

pandas/core/accessor.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
43
accessor.py contains base classes for implementing accessor properties

pandas/core/arrays/_ranges.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Helper functions to generate range-like data for DatetimeArray
43
(and possibly TimedeltaArray/PeriodArray)

pandas/core/arrays/datetimelike.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import datetime, timedelta
32
import operator
43
from typing import Any, Sequence, Tuple, Type, Union

pandas/core/arrays/datetimes.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import datetime, time, timedelta
32
import textwrap
43
from typing import Union

pandas/core/arrays/period.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import timedelta
32
import operator
43
from typing import Any, Callable, Optional, Sequence, Union

pandas/core/arrays/timedeltas.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import timedelta
32
import textwrap
43
import warnings

pandas/core/indexes/datetimelike.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Base and utility classes for tseries type pandas objects.
43
"""

pandas/core/internals/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from .blocks import ( # noqa:F401
32
_block_shape, # io.pytables
43
_safe_reshape, # io.packers

pandas/core/internals/blocks.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from datetime import date, datetime, timedelta
32
import functools
43
import inspect

pandas/core/internals/concat.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# TODO: Needs a better name; too many modules are already called "concat"
32
from collections import defaultdict
43
import copy

pandas/core/internals/managers.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from collections import defaultdict
32
from functools import partial
43
import itertools

pandas/core/strings.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import codecs
32
import re
43
import textwrap

pandas/io/formats/csvs.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Module for formatting output data into CSV files.
43
"""

pandas/io/formats/format.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Internal module for formatting output data in csv, html,
43
and latex files. This module also applies to display formatting.

pandas/io/formats/html.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Module for formatting output data in HTML.
43
"""

pandas/io/formats/latex.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Module for formatting output data in Latex.
43
"""

pandas/io/sql.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Collection of query wrappers / abstractions to both facilitate data
43
retrieval and to reduce dependency on DB-specific API.

pandas/tests/api/test_api.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import pandas as pd
32
from pandas import api
43
from pandas.util import testing as tm

pandas/tests/api/test_types.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from pandas.api import types
32
from pandas.util import testing as tm
43

pandas/tests/arithmetic/conftest.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import numpy as np
32
import pytest
43

pandas/tests/arithmetic/test_datetime64.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Arithmetic tests for DataFrame/Series/Index/Array classes that should
32
# behave identically.
43
# Specifically for datetime64 and datetime64tz dtypes

pandas/tests/arithmetic/test_numeric.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
32
# behave identically.
43
# Specifically for numeric dtypes

pandas/tests/arithmetic/test_object.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
32
# behave identically.
43
# Specifically for object dtype

pandas/tests/arithmetic/test_period.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
32
# behave identically.
43
# Specifically for Period dtype

pandas/tests/arithmetic/test_timedelta64.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
32
# behave identically.
43
from datetime import datetime, timedelta

pandas/tests/arrays/categorical/common.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from pandas import Categorical
42

53

pandas/tests/arrays/categorical/test_analytics.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import sys
42

53
import numpy as np

pandas/tests/arrays/categorical/test_api.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import numpy as np
42
import pytest
53

pandas/tests/arrays/categorical/test_constructors.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from datetime import datetime
42

53
import numpy as np

pandas/tests/arrays/categorical/test_dtypes.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import numpy as np
32
import pytest
43

pandas/tests/arrays/categorical/test_indexing.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import numpy as np
42
import pytest
53

pandas/tests/arrays/categorical/test_missing.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import collections
32

43
import numpy as np

pandas/tests/arrays/categorical/test_operators.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import operator
32

43
import numpy as np

pandas/tests/arrays/categorical/test_repr.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import numpy as np
42

53
from pandas import (

pandas/tests/arrays/categorical/test_sorting.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import numpy as np
42
import pytest
53

0 commit comments

Comments
 (0)