Skip to content

Commit 396da54

Browse files
authored
Merge branch 'main' into python-db-dtypes-pandas-issue28
2 parents bfd31f0 + e29444b commit 396da54

File tree

98 files changed

+1646
-902
lines changed

Some content is hidden

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

98 files changed

+1646
-902
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ repos:
7070
- id: rst-inline-touching-normal
7171
types: [text] # overwrite types: [rst]
7272
types_or: [python, rst]
73+
- repo: https://github.com/sphinx-contrib/sphinx-lint
74+
rev: v0.2
75+
hooks:
76+
- id: sphinx-lint
7377
- repo: https://github.com/asottile/yesqa
7478
rev: v1.3.0
7579
hooks:
@@ -172,6 +176,13 @@ repos:
172176
files: ^pandas/core/
173177
exclude: ^pandas/core/api\.py$
174178
types: [python]
179+
- id: use-io-common-urlopen
180+
name: Use pandas.io.common.urlopen instead of urllib.request.urlopen
181+
language: python
182+
entry: python scripts/use_io_common_urlopen.py
183+
files: ^pandas/
184+
exclude: ^pandas/tests/
185+
types: [python]
175186
- id: no-bool-in-core-generic
176187
name: Use bool_t instead of bool in pandas/core/generic.py
177188
entry: python scripts/no_bool_in_generic.py

MANIFEST.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include RELEASE.md
2+
include versioneer.py
23

34
graft doc
45
prune doc/build
@@ -54,9 +55,6 @@ global-exclude *.pxi
5455
# exclude the whole directory to avoid running related tests in sdist
5556
prune pandas/tests/io/parser/data
5657

57-
include versioneer.py
58-
include pandas/_version.py
59-
include pandas/io/formats/templates/*.tpl
60-
58+
# Selectively re-add *.cxx files that were excluded above
6159
graft pandas/_libs/src
6260
graft pandas/_libs/tslibs/src

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12-
- hypothesis>=5.5.3
1312
- psutil
1413
- pytest-asyncio>=0.17
1514
- boto3
@@ -27,6 +26,7 @@ dependencies:
2726
- fastparquet
2827
- fsspec
2928
- html5lib
29+
- hypothesis
3030
- gcsfs
3131
- jinja2
3232
- lxml

ci/deps/actions-38-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ dependencies:
1010
- pytest>=6.0
1111
- pytest-cov
1212
- pytest-xdist>=1.31
13-
- hypothesis>=5.5.3
1413
- psutil
1514
- pytest-asyncio>=0.17
1615
- boto3
@@ -28,6 +27,7 @@ dependencies:
2827
- fastparquet
2928
- fsspec
3029
- html5lib
30+
- hypothesis
3131
- gcsfs
3232
- jinja2
3333
- lxml

ci/deps/actions-38-minimum_versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies:
1111
- pytest>=6.0
1212
- pytest-cov
1313
- pytest-xdist>=1.31
14-
- hypothesis>=5.5.3
1514
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
@@ -29,6 +28,7 @@ dependencies:
2928
- fastparquet=0.4.0
3029
- fsspec=0.7.4
3130
- html5lib=1.1
31+
- hypothesis=5.5.3
3232
- gcsfs=0.6.0
3333
- jinja2=2.11
3434
- lxml=4.5.0

ci/deps/actions-38.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12-
- hypothesis>=5.5.3
1312
- psutil
1413
- pytest-asyncio>=0.17
1514
- boto3
@@ -27,6 +26,7 @@ dependencies:
2726
- fastparquet
2827
- fsspec
2928
- html5lib
29+
- hypothesis
3030
- gcsfs
3131
- jinja2
3232
- lxml

ci/deps/actions-39.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12-
- hypothesis>=5.5.3
1312
- psutil
1413
- pytest-asyncio>=0.17
1514
- boto3
@@ -27,6 +26,7 @@ dependencies:
2726
- fastparquet
2827
- fsspec
2928
- html5lib
29+
- hypothesis
3030
- gcsfs
3131
- jinja2
3232
- lxml

ci/deps/circle-38-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies:
99
- pytest>=6.0
1010
- pytest-cov
1111
- pytest-xdist>=1.31
12-
- hypothesis>=5.5.3
1312
- psutil
1413
- pytest-asyncio>=0.17
1514
- boto3
@@ -27,6 +26,7 @@ dependencies:
2726
- fastparquet
2827
- fsspec
2928
- html5lib
29+
- hypothesis
3030
- gcsfs
3131
- jinja2
3232
- lxml

doc/source/development/code_style.rst

Lines changed: 0 additions & 31 deletions
This file was deleted.

doc/source/development/contributing_codebase.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ In addition to ``./ci/code_checks.sh``, some extra checks are run by
3737
``pre-commit`` - see :ref:`here <contributing.pre-commit>` for how to
3838
run them.
3939

40-
Additional standards are outlined on the :ref:`pandas code style guide <code_style>`.
41-
4240
.. _contributing.pre-commit:
4341

4442
Pre-commit
4543
----------
4644

4745
Additionally, :ref:`Continuous Integration <contributing.ci>` will run code formatting checks
48-
like ``black``, ``flake8``, ``isort``, and ``cpplint`` and more using `pre-commit hooks <https://pre-commit.com/>`_
46+
like ``black``, ``flake8`` (including a `pandas-dev-flaker <https://github.com/pandas-dev/pandas-dev-flaker>`_ plugin),
47+
``isort``, and ``cpplint`` and more using `pre-commit hooks <https://pre-commit.com/>`_
4948
Any warnings from these checks will cause the :ref:`Continuous Integration <contributing.ci>` to fail; therefore,
5049
it is helpful to run the check yourself before submitting code. This
5150
can be done by installing ``pre-commit``::
@@ -223,7 +222,7 @@ In some cases you may be tempted to use ``cast`` from the typing module when you
223222
...
224223
else: # Reasonably only str objects would reach this but...
225224
obj = cast(str, obj) # Mypy complains without this!
226-
return obj.upper()
225+
return obj.upper()
227226
228227
The limitation here is that while a human can reasonably understand that ``is_number`` would catch the ``int`` and ``float`` types mypy cannot make that same inference just yet (see `mypy #5206 <https://github.com/python/mypy/issues/5206>`_. While the above works, the use of ``cast`` is **strongly discouraged**. Where applicable a refactor of the code to appease static analysis is preferable
229228

0 commit comments

Comments
 (0)