Backport PR #45641 on branch 1.4.x (Switch deps to Conda)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5232b76a6388d..3ffcf29f47688 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -43,7 +43,7 @@ repos:
         - flake8==4.0.1
         - flake8-comprehensions==3.7.0
         - flake8-bugbear==21.3.2
-        - pandas-dev-flaker==0.2.0
+        - pandas-dev-flaker==0.4.0
 -   repo: https://github.com/PyCQA/isort
     rev: 5.10.1
     hooks:
diff --git a/environment.yml b/environment.yml
index e5b1217be6d54..d49192a7fb165 100644
--- a/environment.yml
+++ b/environment.yml
@@ -32,10 +32,12 @@ dependencies:
   # documentation
   - gitpython  # obtain contributors from git for whatsnew
   - gitdb
-  - sphinx
-  - sphinx-panels
   - numpydoc < 1.2  # 2021-02-09 1.2dev breaking CI
+  - pandas-dev-flaker=0.4.0
   - pydata-sphinx-theme
+  - pytest-cython
+  - sphinx
+  - sphinx-panels
   - types-python-dateutil
   - types-PyMySQL
   - types-pytz
@@ -78,7 +80,6 @@ dependencies:
   - ipywidgets
   - nbformat
   - notebook>=6.0.3
-  - pip
 
   # optional
   - blosc
@@ -120,6 +121,3 @@ dependencies:
   - pyreadstat  # pandas.read_spss
   - tabulate>=0.8.3  # DataFrame.to_markdown
   - natsort  # DataFrame.sort_values
-  - pip:
-    - pandas-dev-flaker==0.2.0
-    - pytest-cython
diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py
index 1f1ca434a22c0..507516e9c5868 100644
--- a/pandas/io/formats/excel.py
+++ b/pandas/io/formats/excel.py
@@ -85,7 +85,9 @@ def __init__(
         **kwargs,
     ):
         if css_styles and css_converter:
-            css = ";".join(a + ":" + str(v) for (a, v) in css_styles[css_row, css_col])
+            css = ";".join(
+                [a + ":" + str(v) for (a, v) in css_styles[css_row, css_col]]
+            )
             style = css_converter(css)
 
         return super().__init__(row=row, col=col, val=val, style=style, **kwargs)
diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py
index 9d4998784222f..910ba63b5bb3a 100644
--- a/pandas/io/json/_json.py
+++ b/pandas/io/json/_json.py
@@ -724,7 +724,7 @@ def _combine_lines(self, lines) -> str:
         Combines a list of JSON objects into one JSON object.
         """
         return (
-            f'[{",".join((line for line in (line.strip() for line in lines) if line))}]'
+            f'[{",".join([line for line in (line.strip() for line in lines) if line])}]'
         )
 
     def read(self):
diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py
index 3ce5cb31a127a..2b68eeba09621 100644
--- a/pandas/io/pytables.py
+++ b/pandas/io/pytables.py
@@ -2030,10 +2030,10 @@ def __repr__(self) -> str:
             map(pprint_thing, (self.name, self.cname, self.axis, self.pos, self.kind))
         )
         return ",".join(
-            (
+            [
                 f"{key}->{value}"
                 for key, value in zip(["name", "cname", "axis", "pos", "kind"], temp)
-            )
+            ]
         )
 
     def __eq__(self, other: Any) -> bool:
@@ -2331,10 +2331,10 @@ def __repr__(self) -> str:
             )
         )
         return ",".join(
-            (
+            [
                 f"{key}->{value}"
                 for key, value in zip(["name", "cname", "dtype", "kind", "shape"], temp)
-            )
+            ]
         )
 
     def __eq__(self, other: Any) -> bool:
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 314a897189738..581c64c1b3f0c 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -18,10 +18,12 @@ pycodestyle
 pyupgrade
 gitpython
 gitdb
-sphinx
-sphinx-panels
 numpydoc < 1.2
+pandas-dev-flaker==0.4.0
 pydata-sphinx-theme
+pytest-cython
+sphinx
+sphinx-panels
 types-python-dateutil
 types-PyMySQL
 types-pytz
@@ -52,7 +54,6 @@ statsmodels
 ipywidgets
 nbformat
 notebook>=6.0.3
-pip
 blosc
 bottleneck>=1.3.1
 ipykernel
@@ -84,6 +85,4 @@ cftime
 pyreadstat
 tabulate>=0.8.3
 natsort
-pandas-dev-flaker==0.2.0
-pytest-cython
 setuptools>=51.0.0
diff --git a/scripts/tests/test_sync_flake8_versions.py b/scripts/tests/test_sync_flake8_versions.py
index 21c3b743830ee..cd8d18f7e41cc 100644
--- a/scripts/tests/test_sync_flake8_versions.py
+++ b/scripts/tests/test_sync_flake8_versions.py
@@ -87,7 +87,7 @@ def test_get_revisions_no_failure(capsys):
                     {
                         "id": "flake8",
                         "additional_dependencies": [
-                            "pandas-dev-flaker==0.2.0",
+                            "pandas-dev-flaker==0.4.0",
                             "flake8-bugs==1.1.1",
                         ],
                     }
@@ -101,7 +101,7 @@ def test_get_revisions_no_failure(capsys):
                         "id": "yesqa",
                         "additional_dependencies": [
                             "flake8==0.1.1",
-                            "pandas-dev-flaker==0.2.0",
+                            "pandas-dev-flaker==0.4.0",
                             "flake8-bugs==1.1.1",
                         ],
                     }
@@ -116,7 +116,7 @@ def test_get_revisions_no_failure(capsys):
             {
                 "pip": [
                     "git+https://github.com/pydata/pydata-sphinx-theme.git@master",
-                    "pandas-dev-flaker==0.2.0",
+                    "pandas-dev-flaker==0.4.0",
                 ]
             },
         ]
diff --git a/setup.cfg b/setup.cfg
index 9deebb835eff7..27a5c51d2f2aa 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -103,7 +103,11 @@ ignore =
     # tests use comparisons but not their returned value
     B015,
     # false positives
-    B301
+    B301,
+    # single-letter variables
+    PDF023
+    # "use 'pandas._testing' instead" in non-test code
+    PDF025
 exclude =
     doc/sphinxext/*.py,
     doc/build/*.py,

Backport PR #45641: Switch deps to Conda