]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
standardizing to other SqlAlchemy coding conventions: 645/head
authorjonathan vanasco <jonathan@2xlp.com>
Mon, 20 Jan 2020 23:44:20 +0000 (18:44 -0500)
committerjonathan vanasco <jonathan@2xlp.com>
Mon, 20 Jan 2020 23:44:20 +0000 (18:44 -0500)
* migrated `black` config to `pyproject.toml`
* updated black version
* updated README to showcase code-of-conduct and development links

.pre-commit-config.yaml
README.rst
alembic/util/compat.py
pyproject.toml [new file with mode: 0644]
tests/conftest.py
tests/test_mysql.py

index e4427aa3a3d11fe5b28cb12a238c226267e9cab7..af06dcd79534dad72609a9c8579925114749254e 100644 (file)
@@ -2,10 +2,9 @@
 # See https://pre-commit.com/hooks.html for more hooks
 repos:
 -   repo: https://github.com/python/black/
-    rev: 19.3b0
+    rev: 19.10b0
     hooks:
     -   id: black
-        args: [-l 79]
 
 -   repo: https://github.com/sqlalchemyorg/zimports/
     rev: master
index 41ff16aa80d6bba42baa4623c3c2ada9c9e14ada..59c837151edc055241f8251894d028e338b17b35 100644 (file)
@@ -76,3 +76,29 @@ The goals of Alembic are:
 
 Documentation and status of Alembic is at https://alembic.sqlalchemy.org/
 
+The SQLAlchemy Project
+======================
+
+Alembic is part of the `SQLAlchemy Project <https://www.sqlalchemy.org>`_ and
+adheres to the same standards and conventions as the core project.
+
+Development / Bug reporting / Pull requests
+___________________________________________
+
+Please refer to the
+`SQLAlchemy Community Guide <https://www.sqlalchemy.org/develop.html>`_ for
+guidelines on coding and participating in this project.
+
+Code of Conduct
+_______________
+
+Above all, SQLAlchemy places great emphasis on polite, thoughtful, and
+constructive communication between users and developers.
+Please see our current Code of Conduct at
+`Code of Conduct <https://www.sqlalchemy.org/codeofconduct.html>`_.
+
+License
+=======
+
+Alembic is distributed under the `MIT license
+<https://opensource.org/licenses/MIT>`_.
index 78a93fe97f269c008cd52798f5e85b39ba793b77..09388a092d806e8e95c3fadb30d19415d7cabd25 100644 (file)
@@ -266,7 +266,7 @@ try:
 except AttributeError:
     # Python 2
     def exec_(func_text, globals_, lcl):
-        exec("exec func_text in globals_, lcl")
+        exec ("exec func_text in globals_, lcl")
 
 
 ################################################
@@ -298,7 +298,7 @@ if py3k:
 
 
 else:
-    exec(
+    exec (
         "def reraise(tp, value, tb=None, cause=None):\n"
         "    raise tp, value, tb\n"
     )
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..486bbe6
--- /dev/null
@@ -0,0 +1,3 @@
+[tool.black]
+line-length = 79
+target-version = ['py27']
index a83dff5833678cd5c7c8b62acce8583ba6b44025..67378befa661c997ff6e9627992438894191462d 100755 (executable)
@@ -31,5 +31,5 @@ bootstrap_file = os.path.join(
 with open(bootstrap_file) as f:
     code = compile(f.read(), "bootstrap.py", "exec")
     to_bootstrap = "pytest"
-    exec(code, globals(), locals())
+    exec (code, globals(), locals())
     from pytestplugin import *  # noqa
index f76831fd6ba2b80a0f51f598542e3fac31495c77..f522cc8033dbd1accc565b62b137e32327552c0c 100644 (file)
@@ -470,7 +470,7 @@ class MySQLBackendOpTest(AlterColRoundTripFixture, TestBase):
         )
 
     def test_add_timestamp_server_default_current_timestamp_bundle_onupdate(
-        self
+        self,
     ):
         # note SQLAlchemy reflection bundles the ON UPDATE part into the
         # server default reflection see
@@ -485,7 +485,7 @@ class MySQLBackendOpTest(AlterColRoundTripFixture, TestBase):
         )
 
     def test_add_datetime_server_default_current_timestamp_bundle_onupdate(
-        self
+        self,
     ):
         # note SQLAlchemy reflection bundles the ON UPDATE part into the
         # server default reflection see