Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: remove '# -*- coding: utf-8 -*-' pattern #26197

Merged
merged 3 commits into from
Apr 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion asv_bench/benchmarks/offset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import warnings
from datetime import datetime

Expand Down
4 changes: 4 additions & 0 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -r -E --include '*.py' "[[:space:]] pytest.raises" pandas/tests/
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Check for python2-style file encodings' ; echo $MSG
invgrep -R --include="*.py" --include="*.pyx" -E "# -\*- coding: utf-8 -\*-" pandas scripts
RET=$(($RET + $?)) ; echo $MSG "DONE"

# Check for the following code in testing: `np.testing` and `np.array_equal`
MSG='Check for invalid testing' ; echo $MSG
invgrep -r -E --include '*.py' --exclude testing.py '(numpy|np)(\.testing|\.array_equal)' pandas/tests/
Expand Down
1 change: 0 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# pandas documentation build configuration file, created by
#
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# flake8: noqa

from .tslibs import (
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/algos.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/groupby.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t
from cython cimport floating
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/hashing.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Translated from the reference implementation
# at https://github.com/veorq/SipHash

Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/hashtable.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

cimport cython

from cpython cimport (PyObject, Py_INCREF,
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/index.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta, date

import cython
Expand Down
3 changes: 0 additions & 3 deletions pandas/_libs/indexing.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-


cdef class _NDFrameIndexerBase:
"""
A base class for _NDFrameIndexer for fast instantiation and attribute
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/internals.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/interval.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import numbers
from operator import le, lt

Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/join.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from decimal import Decimal
from fractions import Fraction
from numbers import Number
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/missing.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/ops.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import operator

from cpython cimport (PyObject_RichCompareBool,
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/properties.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from cython import Py_ssize_t

from cpython cimport (
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/reduction.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion

from cython import Py_ssize_t
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/reshape.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/sparse.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import cython

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslib.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import cython

from cpython.datetime cimport (PyDateTime_Check, PyDate_Check,
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# flake8: noqa

from .conversion import normalize_date, localize_pydatetime
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/c_timestamp.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
_Timestamp is a c-defined subclass of datetime.datetime

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/ccalendar.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# cython: boundscheck=False
"""
Cython implementations of functions resembling the stdlib calendar module
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/conversion.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import cython

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/fields.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Functions for accessing attributes of Timestamp/datetime64/datetime-like
objects and arrays
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/frequencies.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import re

cimport numpy as cnp
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/nattype.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from cpython cimport (
PyObject_RichCompare,
Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE)
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/np_datetime.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from cpython cimport Py_EQ, Py_NE, Py_GE, Py_GT, Py_LT, Py_LE

from cpython.datetime cimport (datetime, date,
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython

import time
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/parsing.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Parsing functions for datetime and datetime-like strings.
"""
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import datetime

from cpython cimport (
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/tslibs/resolution.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import numpy as np
from numpy cimport ndarray, int64_t, int32_t

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/strptime.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Strptime-related classes and functions.
"""
import time
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import collections
import textwrap
import warnings
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import sys
import warnings

Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/tslibs/timezones.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import timezone

# dateutil compat
Expand Down
1 change: 0 additions & 1 deletion pandas/_libs/window.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# cython: boundscheck=False, wraparound=False, cdivision=True

import cython
Expand Down
2 changes: 0 additions & 2 deletions pandas/_libs/writers.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import cython
from cython import Py_ssize_t

Expand Down
1 change: 0 additions & 1 deletion pandas/core/accessor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""

accessor.py contains base classes for implementing accessor properties
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/_ranges.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Helper functions to generate range-like data for DatetimeArray
(and possibly TimedeltaArray/PeriodArray)
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import operator
from typing import Any, Sequence, Tuple, Type, Union
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import datetime, time, timedelta
import textwrap
from typing import Union
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import timedelta
import operator
from typing import Any, Callable, Optional, Sequence, Union
Expand Down
1 change: 0 additions & 1 deletion pandas/core/arrays/timedeltas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import timedelta
import textwrap
import warnings
Expand Down
1 change: 0 additions & 1 deletion pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Base and utility classes for tseries type pandas objects.
"""
Expand Down
1 change: 0 additions & 1 deletion pandas/core/internals/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from .blocks import ( # noqa:F401
_block_shape, # io.pytables
_safe_reshape, # io.packers
Expand Down
1 change: 0 additions & 1 deletion pandas/core/internals/blocks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
import functools
import inspect
Expand Down
1 change: 0 additions & 1 deletion pandas/core/internals/concat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# TODO: Needs a better name; too many modules are already called "concat"
from collections import defaultdict
import copy
Expand Down
1 change: 0 additions & 1 deletion pandas/core/internals/managers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from collections import defaultdict
from functools import partial
import itertools
Expand Down
1 change: 0 additions & 1 deletion pandas/core/strings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import codecs
import re
import textwrap
Expand Down
1 change: 0 additions & 1 deletion pandas/io/formats/csvs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Module for formatting output data into CSV files.
"""
Expand Down
1 change: 0 additions & 1 deletion pandas/io/formats/format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Internal module for formatting output data in csv, html,
and latex files. This module also applies to display formatting.
Expand Down
1 change: 0 additions & 1 deletion pandas/io/formats/html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Module for formatting output data in HTML.
"""
Expand Down
1 change: 0 additions & 1 deletion pandas/io/formats/latex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Module for formatting output data in Latex.
"""
Expand Down
1 change: 0 additions & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import pandas as pd
from pandas import api
from pandas.util import testing as tm
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/api/test_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from pandas.api import types
from pandas.util import testing as tm

Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import numpy as np
import pytest

Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/test_datetime64.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for datetime64 and datetime64tz dtypes
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/test_numeric.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for numeric dtypes
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/test_object.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for object dtype
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/test_period.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for Period dtype
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arithmetic/test_timedelta64.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
# behave identically.
from datetime import datetime, timedelta
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from pandas import Categorical


Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_analytics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import sys

import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import numpy as np
import pytest

Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_constructors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from datetime import datetime

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arrays/categorical/test_dtypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import numpy as np
import pytest

Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_indexing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import numpy as np
import pytest

Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arrays/categorical/test_missing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import collections

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/arrays/categorical/test_operators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import operator

import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_repr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import numpy as np

from pandas import (
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/arrays/categorical/test_sorting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import numpy as np
import pytest

Expand Down
Loading