Skip to content

Commit

Permalink
formating changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed May 17, 2020
1 parent f9c960f commit 12c888c
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -4,4 +4,4 @@ repos:
hooks:
- id: black
language_version: python3.8
args: [--line-length=130, --skip-string-normalization,--exclude=lib/exabgp/vendoring]
args: [--line-length=120, --skip-string-normalization,--exclude=lib/exabgp/vendoring]
2 changes: 1 addition & 1 deletion dev/bin/recorder-connect
Expand Up @@ -40,7 +40,7 @@ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Connect the socket to the port on the server given by the caller
server_address = (sys.argv[1], int(sys.argv[2]))
print >> sys.stderr, 'connecting to %s port %s' % server_address
sys.stderr.write('connecting to %s port %s\n' % server_address)
sock.connect(server_address)

with open(sys.argv[3]) as record:
Expand Down
2 changes: 1 addition & 1 deletion dev/bin/replay-connect
Expand Up @@ -10,7 +10,7 @@ if len(sys.argv) != 4:
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = (sys.argv[1], int(sys.argv[2]))
print >> sys.stderr, 'connecting to %s port %s' % server_address
sys.stderr('connecting to %s port %s\n' % server_address)
sock.connect(server_address)
except socket.error:
print "failed to connect to server"
Expand Down
348 changes: 187 additions & 161 deletions etc/exabgp/example-tcp-control.run

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions lib/exabgp/application/pipe.py
Expand Up @@ -151,9 +151,7 @@ def loop(self):

def monitor(function):
def wrapper(*args):
# print >> sys.stderr, "%s(%s)" % (function.func_name,','.join([str(_).replace('\n','\\n') for _ in args]))
r = function(*args)
# print >> sys.stderr, "%s -> %s" % (function.func_name,str(r))
return r

return wrapper
Expand Down
5 changes: 4 additions & 1 deletion qa/bin/functional
Expand Up @@ -42,6 +42,7 @@ export exabgp_debug_rotate=true
export exabgp_debug_defensive=true
"""


class Color(object):
NONE = '\033[0m' + '\033[0m' + ' ' # NONE
STARTING = '\033[0m' + '\033[96m' + '~' # LIGHT BLUE
Expand Down Expand Up @@ -434,7 +435,9 @@ if __name__ == '__main__':
def run(parsed):
Port.base = parsed.port
if parsed.test:
to_run = [parsed.test, ]
to_run = [
parsed.test,
]
else:
to_run = [index for index, _ in Identifier.identifiers()]
chunk = len(to_run) if not parsed.steps else parsed.steps
Expand Down
1 change: 0 additions & 1 deletion qa/self/api/receive.py
Expand Up @@ -33,7 +33,6 @@

while True:
line = sys.stdin.readline().strip()
# print >> sys.stderr, '[%s]' % line.replace('\n','\\n'), start, end

options = match[count % 4]

Expand Down
2 changes: 1 addition & 1 deletion qa/tests/parsing_test.py
Expand Up @@ -42,7 +42,7 @@ def test_all_configuration(self):
print(filename)
print('=' * 80)
sys.stdout.flush()
configuration = Configuration([filename, ])
configuration = Configuration([filename,])
configuration.reload()
del configuration

Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -24,6 +24,7 @@

sys.path.append(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), 'lib'))


def filesOf(directory):
return [
os.path.join(directory, fname)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[flake8]
ignore = W191
max-line-length = 130
max-line-length = 120
max-complexity = 10
exclude =
.git,
Expand Down

0 comments on commit 12c888c

Please sign in to comment.