diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/catalog_helpers.py b/airbyte-cdk/python/airbyte_cdk/base_python/catalog_helpers.py index 3dab29c2f38..9097ee64537 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/catalog_helpers.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/catalog_helpers.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from airbyte_cdk.models import AirbyteCatalog, SyncMode diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/abstract_source.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/abstract_source.py index 31b9392b1a3..f28f0960b43 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/abstract_source.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/abstract_source.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import copy from abc import ABC, abstractmethod from datetime import datetime diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/core.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/core.py index ae1171b555e..f1a6af6a50e 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/core.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/core.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from abc import ABC, abstractmethod from typing import Any, Mapping diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/jwt.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/jwt.py index 0b05177c9fc..6fde583fafd 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/jwt.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/jwt.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from typing import Any, Mapping from airbyte_cdk.base_python.cdk.streams.auth.core import HttpAuthenticator diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/oauth.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/oauth.py index cf684d67644..3e5e0afc5fb 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/oauth.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/oauth.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from typing import Any, Mapping, Tuple import pendulum diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/token.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/token.py index 861d40e5789..bbc37e7e591 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/token.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/auth/token.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from typing import Any, Mapping from airbyte_cdk.base_python.cdk.streams.auth.core import HttpAuthenticator diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/core.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/core.py index 5a640798c4a..57536dd3b5a 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/core.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/core.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import inspect from abc import ABC, abstractmethod from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Union diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/exceptions.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/exceptions.py index a87ae9b017a..57674520d31 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/exceptions.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/exceptions.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from typing import Union import requests diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/http.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/http.py index b44d187624f..bf1422179e8 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/http.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/http.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from abc import ABC, abstractmethod from typing import Any, Iterable, List, Mapping, MutableMapping, Optional diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/rate_limiting.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/rate_limiting.py index ac40c99a1a4..2cf642aac01 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/rate_limiting.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/streams/rate_limiting.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import sys import time diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/utils/casing.py b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/utils/casing.py index 82796041a6c..3f85b55d923 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/cdk/utils/casing.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/cdk/utils/casing.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import re diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/client.py b/airbyte-cdk/python/airbyte_cdk/base_python/client.py index 7f7e0b506f6..3e3469bf506 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/client.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/client.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import inspect from abc import ABC, abstractmethod from typing import Any, Callable, Dict, Generator, List, Mapping, Tuple diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/entrypoint.py b/airbyte-cdk/python/airbyte_cdk/base_python/entrypoint.py index 823b13ac67c..16d5d331010 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/entrypoint.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/entrypoint.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import argparse import importlib import os.path diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/integration.py b/airbyte-cdk/python/airbyte_cdk/base_python/integration.py index a6be263c663..18a56faf2bb 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/integration.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/integration.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import json import os import pkgutil diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/logger.py b/airbyte-cdk/python/airbyte_cdk/base_python/logger.py index cc200fb99d9..b429bcca990 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/logger.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/logger.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import traceback from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/schema_helpers.py b/airbyte-cdk/python/airbyte_cdk/base_python/schema_helpers.py index 55446eee0df..2f7df1305e3 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/schema_helpers.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/schema_helpers.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import json import os import pkgutil diff --git a/airbyte-cdk/python/airbyte_cdk/base_python/source.py b/airbyte-cdk/python/airbyte_cdk/base_python/source.py index 961fd66dafb..8c50e2a660c 100644 --- a/airbyte-cdk/python/airbyte_cdk/base_python/source.py +++ b/airbyte-cdk/python/airbyte_cdk/base_python/source.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import copy from datetime import datetime from typing import Any, Iterator, Mapping, MutableMapping, Type diff --git a/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py b/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py index b424b790b95..dda33013c3e 100644 --- a/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py +++ b/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - from __future__ import annotations from enum import Enum diff --git a/airbyte-cdk/python/airbyte_cdk/singer/singer_helpers.py b/airbyte-cdk/python/airbyte_cdk/singer/singer_helpers.py index 5c6500e4c52..9e4a021eb48 100644 --- a/airbyte-cdk/python/airbyte_cdk/singer/singer_helpers.py +++ b/airbyte-cdk/python/airbyte_cdk/singer/singer_helpers.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import json import os import selectors diff --git a/airbyte-cdk/python/airbyte_cdk/singer/source.py b/airbyte-cdk/python/airbyte_cdk/singer/source.py index 5d6c1477dcd..86409bfc5b4 100644 --- a/airbyte-cdk/python/airbyte_cdk/singer/source.py +++ b/airbyte-cdk/python/airbyte_cdk/singer/source.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import json import os from dataclasses import dataclass diff --git a/airbyte-cdk/python/setup.py b/airbyte-cdk/python/setup.py index b0622c7f4c5..6c8f9870a78 100644 --- a/airbyte-cdk/python/setup.py +++ b/airbyte-cdk/python/setup.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import setuptools setuptools.setup( diff --git a/airbyte-integrations/connector-templates/source-python/integration_tests/acceptance.py b/airbyte-integrations/connector-templates/source-python/integration_tests/acceptance.py index 0fe4bf22880..54577669329 100644 --- a/airbyte-integrations/connector-templates/source-python/integration_tests/acceptance.py +++ b/airbyte-integrations/connector-templates/source-python/integration_tests/acceptance.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import pytest pytest_plugins = ("source_acceptance_test.plugin",) diff --git a/airbyte-integrations/connector-templates/source-singer/integration_tests/acceptance.py b/airbyte-integrations/connector-templates/source-singer/integration_tests/acceptance.py index 0fe4bf22880..54577669329 100644 --- a/airbyte-integrations/connector-templates/source-singer/integration_tests/acceptance.py +++ b/airbyte-integrations/connector-templates/source-singer/integration_tests/acceptance.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import pytest pytest_plugins = ("source_acceptance_test.plugin",) diff --git a/airbyte-integrations/connectors/source-stock-ticker-api-tutorial/source.py b/airbyte-integrations/connectors/source-stock-ticker-api-tutorial/source.py index b805220e75f..9e450a2e956 100644 --- a/airbyte-integrations/connectors/source-stock-ticker-api-tutorial/source.py +++ b/airbyte-integrations/connectors/source-stock-ticker-api-tutorial/source.py @@ -1,18 +1,17 @@ - # MIT License -# +# # Copyright (c) 2020 Airbyte -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22,7 +21,6 @@ # SOFTWARE. - import argparse # helps parse commandline arguments import json import sys diff --git a/build.gradle b/build.gradle index a40b1668236..3d2fb98a844 100644 --- a/build.gradle +++ b/build.gradle @@ -16,15 +16,27 @@ if (!env.containsKey('VERSION')) { } def createLicenseWith = { File license, String startComment, String endComment, String lineComment, boolean isPython -> + /* + In java, we don't have a second linter/styling tool other than spotless so it doesn't really + matter if we write a newline or not for startComment/endComment. + + However, in python, we are using black that double-checks and reformats the code. + Thus, writing an extra empty newline (not removed by trimTrailingWhitespace() is actually a + big deal and would be reformatted (removed) because of black's specs. + */ def tmp = File.createTempFile('tmp', '.tmp') tmp.withWriter { def w = it - w.writeLine(startComment) + if (startComment.length() > 0 || !isPython) { + w.writeLine(startComment) + } license.eachLine { w << lineComment w.writeLine(it) } - w.writeLine(endComment) + if (endComment.length() > 0 || !isPython) { + w.writeLine(endComment) + } w.writeLine("") if (isPython) { w.writeLine("") @@ -94,6 +106,7 @@ spotless { targetExclude createSpotlessTarget('**/__init__.py') licenseHeaderFile createPythonLicenseWith(rootProject.file('LICENSE')), '(from|import|def|""")' + trimTrailingWhitespace() } format 'styling', { target createSpotlessTarget(['**/*.yaml', '**/*.json'])