Fix whitespace issues

* make sure files contain a final newline
* use consistent indentation
* trim excess whitespace
* trim trailing whitespace
This commit is contained in:
a1346054 2021-08-22 20:21:09 +00:00
parent f56f3ae95f
commit 869a36ad82
13 changed files with 24 additions and 24 deletions

View File

@ -30,7 +30,7 @@ jobs:
command: | command: |
cd ~/repo/cli cd ~/repo/cli
poetry run pytest -v ./tests poetry run pytest -v ./tests
test-gui: test-gui:
docker: docker:
- image: circleci/python:3.8-buster - image: circleci/python:3.8-buster

View File

@ -47,7 +47,7 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v1

View File

@ -4,7 +4,7 @@
# Usage # Usage
display_usage() { display_usage() {
echo "Usage: $0 [tag]" echo "Usage: $0 [tag]"
} }
if [ $# -lt 1 ] if [ $# -lt 1 ]
@ -46,13 +46,13 @@ then
echo "Tag does not verify" echo "Tag does not verify"
exit 1 exit 1
fi fi
cat ../verify.txt |grep "using RSA key 927F419D7EC82C2F149C1BD1403C2657CD994F73" cat ../verify.txt | grep "using RSA key 927F419D7EC82C2F149C1BD1403C2657CD994F73"
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "Tag signed with wrong key" echo "Tag signed with wrong key"
exit 1 exit 1
fi fi
cat ../verify.txt |grep "^gpg: Good signature from" cat ../verify.txt | grep "^gpg: Good signature from"
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "Tag verification missing 'Good signature from'" echo "Tag verification missing 'Good signature from'"

View File

@ -320,15 +320,15 @@ div#uploads .upload .upload-status {
} }
div#uploads .upload input.cancel { div#uploads .upload input.cancel {
color: #d0011b; color: #d0011b;
border: 0; border: 0;
background: none; background: none;
box-shadow: none; box-shadow: none;
border-radius: 0px; border-radius: 0px;
cursor: pointer; cursor: pointer;
font-family: sans-serif; font-family: sans-serif;
font-size: 12px; font-size: 12px;
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
float:right; float:right;
} }
@ -398,4 +398,4 @@ a {
a:visited { a:visited {
color: #601ca0; color: #601ca0;
} }

View File

@ -11,7 +11,7 @@ $(function () {
// Store current username received from app context // Store current username received from app context
var current_username = $('#username').val(); var current_username = $('#username').val();
// On browser connect, emit a socket event to be added to // On browser connect, emit a socket event to be added to
// room and assigned random username // room and assigned random username
socket.on('connect', function () { socket.on('connect', function () {
socket.emit('joined', {}); socket.emit('joined', {});

View File

@ -4,7 +4,7 @@
<head> <head>
<title>OnionShare: 403 Forbidden</title> <title>OnionShare: 403 Forbidden</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" /> <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all"> <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head> </head>

View File

@ -4,7 +4,7 @@
<head> <head>
<title>OnionShare: 404 Not Found</title> <title>OnionShare: 404 Not Found</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon"> <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all"> <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head> </head>

View File

@ -4,7 +4,7 @@
<head> <head>
<title>OnionShare: 405 Method Not Allowed</title> <title>OnionShare: 405 Method Not Allowed</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon"> <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all"> <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head> </head>

View File

@ -4,7 +4,7 @@
<head> <head>
<title>OnionShare: An error occurred</title> <title>OnionShare: An error occurred</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon"> <link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all"> <link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
</head> </head>

View File

@ -6,4 +6,4 @@ SCRIPTS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )
cd "$SCRIPTS_DIR" cd "$SCRIPTS_DIR"
cd ../src cd ../src
python -c "import onionshare; onionshare.main()" $@ python -c "import onionshare; onionshare.main()" $@

View File

@ -27,7 +27,7 @@ You will end up with the documentation in all supported locales in `docs/localiz
Here's how preparing translations works: Here's how preparing translations works:
```sh ```sh
# Generate .po files in build/gettext # Generate .po files in build/gettext
make gettext make gettext
# Create a new blank German locale in source/locale, based on .po files # Create a new blank German locale in source/locale, based on .po files

View File

@ -40,7 +40,7 @@ Verbose mode
When developing, it's convenient to run OnionShare from a terminal and add the ``--verbose`` (or ``-v``) flag to the command. When developing, it's convenient to run OnionShare from a terminal and add the ``--verbose`` (or ``-v``) flag to the command.
This prints a lot of helpful messages to the terminal, such as when certain objects are initialized, when events occur (like buttons clicked, settings saved or reloaded), and other debug info. For example:: This prints a lot of helpful messages to the terminal, such as when certain objects are initialized, when events occur (like buttons clicked, settings saved or reloaded), and other debug info. For example::
$ $ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes $ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes
╭───────────────────────────────────────────╮ ╭───────────────────────────────────────────╮
* ▄▄█████▄▄ * * ▄▄█████▄▄ *
│ ▄████▀▀▀████▄ * │ │ ▄████▀▀▀████▄ * │

View File

@ -3,9 +3,9 @@ base: core18
version: '2.4' version: '2.4'
summary: Securely and anonymously share files, host websites, and chat using Tor summary: Securely and anonymously share files, host websites, and chat using Tor
description: | description: |
OnionShare lets you securely and anonymously send and receive files. It works by starting OnionShare lets you securely and anonymously send and receive files. It works by starting
a web server, making it accessible as a Tor onion service, and generating an unguessable a web server, making it accessible as a Tor onion service, and generating an unguessable
web address so others can download files from you, or upload files to you. It does _not_ web address so others can download files from you, or upload files to you. It does _not_
require setting up a separate server or using a third party file-sharing service. require setting up a separate server or using a third party file-sharing service.
grade: stable # stable or devel grade: stable # stable or devel
@ -23,7 +23,7 @@ apps:
- removable-media - removable-media
environment: environment:
LANG: C.UTF-8 LANG: C.UTF-8
cli: cli:
common-id: org.onionshare.OnionShareCli common-id: org.onionshare.OnionShareCli
command: onionshare-cli command: onionshare-cli
@ -146,7 +146,7 @@ parts:
- libssl-dev - libssl-dev
- zlib1g-dev - zlib1g-dev
after: [libevent] after: [libevent]
libevent: libevent:
source: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz source: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
source-checksum: sha256/92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb source-checksum: sha256/92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb