Skip to content

Commit

Permalink
Remove __future__ imports
Browse files Browse the repository at this point in the history
They were used during the migrating to Python 3. Now that we're using
Python 3.7, there is no need of using them (unless we do `from
__future__ import annotations` which will be introduced in Python 4, but
we don't use it).
  • Loading branch information
cript0nauta committed May 6, 2020
1 parent f65f24d commit 4be61fa
Show file tree
Hide file tree
Showing 75 changed files with 0 additions and 94 deletions.
1 change: 0 additions & 1 deletion CHANGELOG/changelog.py
@@ -1,4 +1,3 @@
from __future__ import absolute_import

import os
import packaging.version
Expand Down
1 change: 0 additions & 1 deletion doc/conf.py
Expand Up @@ -16,7 +16,6 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from __future__ import absolute_import
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
Expand Down
2 changes: 0 additions & 2 deletions faraday/migrations/env.py
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import with_statement

import logging
import sys
Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-06-18 18:07:41.834191+00:00
"""
from __future__ import absolute_import

from alembic import op
import sqlalchemy as sa
Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-04-26 20:17:48.639684+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-04-05 16:19:11.216571+00:00
"""
from __future__ import absolute_import
import json
from alembic import op
import sqlalchemy as sa
Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-01-15 13:02:21.000699+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-05-15 18:48:41.909650+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-03-27 19:26:28.354078+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-06-18 15:38:31.879725+00:00
"""
from __future__ import absolute_import

from alembic import op
import sqlalchemy as sa
Expand Down
1 change: 0 additions & 1 deletion faraday/migrations/versions/8a10ff3926a5_2fa_columns.py
Expand Up @@ -5,7 +5,6 @@
Create Date: 2018-11-29 16:34:44.081899+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-05-22 19:17:31.444968+00:00
"""
from __future__ import absolute_import

import uuid
from alembic import op
Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2019-05-14 18:12:52.724079+00:00
"""
from __future__ import absolute_import

from alembic import op
import sqlalchemy as sa
Expand Down
Expand Up @@ -5,7 +5,6 @@
Create Date: 2018-10-23 15:43:52.612619+00:00
"""
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

Expand Down
3 changes: 0 additions & 3 deletions faraday/searcher/searcher.py
Expand Up @@ -6,9 +6,6 @@
## Copyright (C) 2018 Infobyte LLC (http://www.infobytesec.com/)
## See the file 'doc/LICENSE' for the license information
###
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from builtins import str

import ast
Expand Down
1 change: 0 additions & 1 deletion faraday/searcher/sqlapi.py
@@ -1,4 +1,3 @@
from __future__ import absolute_import

import json
import logging
Expand Down
2 changes: 0 additions & 2 deletions manage.py
Expand Up @@ -5,9 +5,7 @@
# See the file 'doc/LICENSE' for the license information

# Developers: the code for faraday-manage is located in faraday/manage.py
from __future__ import absolute_import

from __future__ import print_function
import sys

print(
Expand Down
1 change: 0 additions & 1 deletion scripts/cscan/cscan.py
Expand Up @@ -5,7 +5,6 @@
## See the file 'doc/LICENSE' for the license information
###

from __future__ import absolute_import
from __future__ import print_function
import subprocess
import os
Expand Down
2 changes: 0 additions & 2 deletions scripts/cscan/plugin/carbonator/carbonator.py
Expand Up @@ -6,8 +6,6 @@
#
# For more information contact us at carbonator at integrissecurity dot com
# Or visit us at https://www.integrissecurity.com/
from __future__ import absolute_import
from __future__ import print_function

from burp import IBurpExtender
from burp import IHttpListener
Expand Down
2 changes: 0 additions & 2 deletions scripts/cscan/plugin/msfrpc.py
Expand Up @@ -6,8 +6,6 @@
'''

from __future__ import absolute_import
from __future__ import print_function
import os
import time
import string
Expand Down
2 changes: 0 additions & 2 deletions scripts/cscan/plugin/nessus.py
Expand Up @@ -4,8 +4,6 @@
## Copyright (C) 2015 Infobyte LLC (http://www.infobytesec.com/)
## See the file 'doc/LICENSE' for the license information
###
from __future__ import absolute_import
from __future__ import print_function
import requests
import json
import time
Expand Down
2 changes: 0 additions & 2 deletions scripts/cscan/plugin/w3af.py
Expand Up @@ -4,8 +4,6 @@
# Copyright (C) 2015 Infobyte LLC (http://www.infobytesec.com/)
# See the file 'doc/LICENSE' for the license information

from __future__ import absolute_import
from __future__ import print_function

from w3af_api_client import Connection, Scan
import subprocess
Expand Down
2 changes: 0 additions & 2 deletions scripts/cscan/plugin/zap.py
Expand Up @@ -9,8 +9,6 @@
By tartamar
'''

from __future__ import absolute_import
from __future__ import print_function
from builtins import input

import argparse
Expand Down
2 changes: 0 additions & 2 deletions scripts/fix_vulnweb_without_service.py
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import print_function
import faraday.server.config
from faraday.server.models import (
Host,
Expand Down
2 changes: 0 additions & 2 deletions scripts/merge-conflict-detector.py
Expand Up @@ -9,8 +9,6 @@
our propiertary code. Not useful if you don't have access to
the code of Faraday Professional or Faraday Corporate
'''
from __future__ import absolute_import
from __future__ import print_function

import os
import re
Expand Down
2 changes: 0 additions & 2 deletions scripts/reposify/reposify.py
Expand Up @@ -5,8 +5,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from __future__ import print_function
import sys
import xmlrpc.client
import argparse
Expand Down
1 change: 0 additions & 1 deletion scripts/reposify/reposify_api.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

import requests
import simplejson
Expand Down
2 changes: 0 additions & 2 deletions scripts/shodan_faraday.py
Expand Up @@ -5,8 +5,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from __future__ import print_function

import shodan
import sys
Expand Down
2 changes: 0 additions & 2 deletions scripts/sslcheck.py
Expand Up @@ -7,8 +7,6 @@
'''

#libraries
from __future__ import absolute_import
from __future__ import print_function
import subprocess
import argparse
import re
Expand Down
2 changes: 0 additions & 2 deletions scripts/wcscan.py
Expand Up @@ -7,8 +7,6 @@
'''

from __future__ import absolute_import
from __future__ import print_function
import subprocess
import argparse
from lxml import etree as ET
Expand Down
2 changes: 0 additions & 2 deletions scripts/wcscans/phpini.py
Expand Up @@ -7,8 +7,6 @@

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import re
from lxml import etree as ET

Expand Down
2 changes: 0 additions & 2 deletions scripts/wcscans/webconfig.py
Expand Up @@ -8,8 +8,6 @@
'''

from __future__ import absolute_import
from __future__ import print_function
from lxml import etree as ET

rules = {
Expand Down
1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -4,7 +4,6 @@
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

from tempfile import NamedTemporaryFile

Expand Down
1 change: 0 additions & 1 deletion tests/dont_run_but_update_updates.py
Expand Up @@ -5,7 +5,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

import unittest
import sys
Expand Down
1 change: 0 additions & 1 deletion tests/factories.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from builtins import chr, range

import random
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_cascades.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
import pytest
from contextlib import contextmanager
from faraday.server.models import (
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_file.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
import os
import pytest
from faraday.server.models import File
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_host.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
import random
import pytest
from functools import partial
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_tag.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from faraday.server.models import TagObject


Expand Down
1 change: 0 additions & 1 deletion tests/models/test_vulnerability.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
import pytest
from faraday.server.models import (
CommandObject,
Expand Down
1 change: 0 additions & 1 deletion tests/models/test_workspace.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from faraday.server.models import db, Workspace
from tests.factories import (
HostFactory,
Expand Down
2 changes: 0 additions & 2 deletions tests/test_api_activity_feed.py
Expand Up @@ -4,8 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import
from __future__ import division

import os
import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_agent.py
Expand Up @@ -3,7 +3,6 @@
Copyright (C) 2019 Infobyte LLC (http://www.infobytesec.com/)
See the file 'doc/LICENSE' for the license information
"""
from __future__ import absolute_import

from unittest import mock
import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_bulk_create.py
@@ -1,4 +1,3 @@
from __future__ import absolute_import
from datetime import datetime, timedelta, timezone

import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_commands.py
Expand Up @@ -5,7 +5,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

"""Tests for many API endpoints that do not depend on workspace_name"""
import datetime
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_comment.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

from faraday.server.api.modules.comments import CommentView
from faraday.server.models import Comment
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_credentials.py
Expand Up @@ -4,7 +4,6 @@
See the file 'doc/LICENSE' for the license information
'''
from __future__ import absolute_import

import pytest

Expand Down
1 change: 0 additions & 1 deletion tests/test_api_custom_fields.py
@@ -1,4 +1,3 @@
from __future__ import absolute_import

import pytest

Expand Down

0 comments on commit 4be61fa

Please sign in to comment.