Skip to content

Commit

Permalink
Fix some code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gatsik committed Sep 26, 2021
1 parent 00ed0e4 commit e470b60
Show file tree
Hide file tree
Showing 65 changed files with 189 additions and 127 deletions.
8 changes: 4 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Contributors:
* Fix basic searching in vaults
* Implement somewhat of a cache system like in the Java client
* Online replay vault: fix downloading replays

Contributors:
- Gatsik

Expand Down Expand Up @@ -92,15 +92,15 @@ Contributors:
Contributors:
- Strogo
- muellni

0.18.3
=====
* ICE adapter debug window fixes

Contributors:
- Geosearchef
- muellni

0.18.2
=====
* ICE adapter integration
Expand Down Expand Up @@ -662,7 +662,7 @@ Bugfixes
- Fixed colouring problem with certain names
- Automatic login will now get disabled if login fails
- Fixed exceptions popping up related to corrupted replays
- Logs will no longer fill to unreasonable sizes
- Logs will no longer fill to unreasonable sizes
- Many other small issues fixed


Expand Down
16 changes: 8 additions & 8 deletions res/client/client.css
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ QSplitter::handle:hover
background-color: #353535;
color: orange;
}

QDateEdit:disabled
{
color: #8D8B85;
}

QDateEdit::down-arrow
{
color: orange;
Expand Down Expand Up @@ -297,7 +297,7 @@ QSpinBox#minRating::disabled
background-color: #4b4b4b;
}

QComboBox#filter1, #filter2, #filter3, #filter4, #filter5, #filter6,
QComboBox#filter1, #filter2, #filter3, #filter4, #filter5, #filter6,
#operator1, #operator2, #operator3, #operator4, #operator5, #operator6
{
background-color: #353535;
Expand All @@ -310,7 +310,7 @@ QToolBox#replayToolBox::tab
color: silver;
border-radius: 3px;
padding-left: 145px; /* "alignment: center" doesn't work with toolboxes :| */
}
}

#advancedSearch, #mapPreview
{
Expand Down Expand Up @@ -374,7 +374,7 @@ QHeaderView::section
background-color: #4b4b4b;
font: bold;
border-left: 1 solid;

}

QHeaderView::down-arrow
Expand Down Expand Up @@ -671,15 +671,15 @@ QCheckBox#spoilerCheckbox, #automaticCheckbox, #showLatestCheckbox, #hideUnrChec
{
color: silver;
}
QCheckBox#spoilerCheckbox::indicator:unchecked, #automaticCheckbox::indicator:unchecked, #showLatestCheckbox::indicator:unchecked,
QCheckBox#spoilerCheckbox::indicator:unchecked, #automaticCheckbox::indicator:unchecked, #showLatestCheckbox::indicator:unchecked,
#hideUnrCheckbox::indicator:unchecked
,#landRandomDensity::indicator::unchecked, #plateausRandomDensity::indicator::unchecked, #mountainsRandomDensity::indicator::unchecked
,#rampsRandomDensity::indicator::unchecked, #mexRandomDensity::indicator::unchecked ,#reclaimRandomDensity::indicator::unchecked
{
image: url('%THEMEPATH%/client/chboxUncheked.png');
}

QCheckBox#spoilerCheckbox::indicator:checked, #automaticCheckbox::indicator:checked, #showLatestCheckbox::indicator:checked,
QCheckBox#spoilerCheckbox::indicator:checked, #automaticCheckbox::indicator:checked, #showLatestCheckbox::indicator:checked,
#hideUnrCheckbox::indicator:checked
,#landRandomDensity::indicator::checked, #plateausRandomDensity::indicator::checked, #mountainsRandomDensity::indicator::checked
,#rampsRandomDensity::indicator::checked, #mexRandomDensity::indicator::checked ,#reclaimRandomDensity::indicator::checked
Expand Down Expand Up @@ -759,7 +759,7 @@ QToolButton::checked
background-color:#C0C0C0;
border-radius : 5px;
}

QPushButton#refreshButton, #nextButton, #previousButton, #goToPageButton, #firstButton, #lastButton,
#resetButton, #searchPlayerButton, #UIButton, #uploadButton, #kickButton, #leaveButton
{
Expand Down
2 changes: 1 addition & 1 deletion res/client/randomcolors.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["IndianRed","LightCoral","Salmon","DarkSalmon","LightSalmon","Red","FireBrick","DarkRed","Pink","LightPink","HotPink","DeepPink","MediumVioletRed","PaleVioletRed","LightSalmon","Coral","Tomato","Gold","Yellow","LightYellow","LemonChiffon","LightGoldenrodYellow","PapayaWhip","Moccasin","PeachPuff","PaleGoldenrod","Khaki","DarkKhaki","Lavender","Thistle","Plum","Violet","Orchid","Fuchsia","Magenta","MediumOrchid","MediumPurple","Amethyst","BlueViolet","DarkViolet","DarkOrchid","DarkMagenta","Purple","SlateBlue","DarkSlateBlue","MediumSlateBlue","GreenYellow","Chartreuse","LawnGreen","Lime","LimeGreen","PaleGreen","LightGreen","MediumSpringGreen","SpringGreen","MediumSeaGreen","SeaGreen","ForestGreen","Green","DarkGreen","YellowGreen","OliveDrab","Olive","DarkOliveGreen","MediumAquamarine","DarkSeaGreen","LightSeaGreen","DarkCyan","Teal","Aqua","Cyan","LightCyan","PaleTurquoise","Aquamarine","Turquoise","MediumTurquoise","DarkTurquoise","CadetBlue","SteelBlue","LightSteelBlue","PowderBlue","SkyBlue","DeepSkyBlue","DodgerBlue","CornflowerBlue","MediumSlateBlue","RoyalBlue","Blue","MediumBlue"]
["IndianRed","LightCoral","Salmon","DarkSalmon","LightSalmon","Red","FireBrick","DarkRed","Pink","LightPink","HotPink","DeepPink","MediumVioletRed","PaleVioletRed","LightSalmon","Coral","Tomato","Gold","Yellow","LightYellow","LemonChiffon","LightGoldenrodYellow","PapayaWhip","Moccasin","PeachPuff","PaleGoldenrod","Khaki","DarkKhaki","Lavender","Thistle","Plum","Violet","Orchid","Fuchsia","Magenta","MediumOrchid","MediumPurple","Amethyst","BlueViolet","DarkViolet","DarkOrchid","DarkMagenta","Purple","SlateBlue","DarkSlateBlue","MediumSlateBlue","GreenYellow","Chartreuse","LawnGreen","Lime","LimeGreen","PaleGreen","LightGreen","MediumSpringGreen","SpringGreen","MediumSeaGreen","SeaGreen","ForestGreen","Green","DarkGreen","YellowGreen","OliveDrab","Olive","DarkOliveGreen","MediumAquamarine","DarkSeaGreen","LightSeaGreen","DarkCyan","Teal","Aqua","Cyan","LightCyan","PaleTurquoise","Aquamarine","Turquoise","MediumTurquoise","DarkTurquoise","CadetBlue","SteelBlue","LightSteelBlue","PowderBlue","SkyBlue","DeepSkyBlue","DodgerBlue","CornflowerBlue","MediumSlateBlue","RoyalBlue","Blue","MediumBlue"]
2 changes: 0 additions & 2 deletions res/coop/formatters/coop.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
</td>
<tr>
</table>


9 changes: 4 additions & 5 deletions res/coop/formatters/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ QTabWidget::pane


/* Style the tab using the tab sub-control. Note that it reads QTabBar _not_ QTabWidget */
QTabWidget > QTabBar::tab
QTabWidget > QTabBar::tab
{
background-color:#383838;
color: silver;
Expand All @@ -42,21 +42,21 @@ QTabWidget > QTabBar::tab
}


QTabWidget > QTabBar::tab:!selected
QTabWidget > QTabBar::tab:!selected
{

background-color: #203040;
}


QTabWidget > QTabBar::tab:hover
QTabWidget > QTabBar::tab:hover
{
color:white;
background-color: #606060;
}


QTabWidget > QTabBar::tab:selected
QTabWidget > QTabBar::tab:selected
{
color:white;
background-color: #303030;
Expand Down Expand Up @@ -106,4 +106,3 @@ body {background-color: #2f2f2f; overflow: hidden;}
.pages .current_page {color: black;}

.search_form {float: left;}

2 changes: 0 additions & 2 deletions res/games/formatters/faf.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@
</tr>
</tbody>
</table>


6 changes: 3 additions & 3 deletions res/notification_system/dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</property>
<property name="styleSheet">
<string notr="true">QDialog {

background-color: #272b30;
}

Expand Down Expand Up @@ -56,7 +56,7 @@ QPushButton:hover {
background-color: rgba(0,0,0,0);
width: 18px;
height: 18px;

}</string>
</property>
<layout class="QVBoxLayout">
Expand Down Expand Up @@ -118,7 +118,7 @@ QPushButton:hover {
<string notr="true">QLabel {
color: rgb(255, 255, 255);
font-weight: bold;
font-family: Verdana;
font-family: Verdana;
font-size:13pt;
}

Expand Down
1 change: 0 additions & 1 deletion res/stats/formatters/ladder_header.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
<th width="100%">{name}</th>
<th align="center" width="50">{score}</th>
</tr>

4 changes: 2 additions & 2 deletions res/stats/formatters/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ QTabWidget::pane
}

/* Style the tab using the tab sub-control. Note that it reads QTabBar _not_ QTabWidget */
QTabWidget > QTabBar::tab
QTabWidget > QTabBar::tab
{
background-color:#383838;
color: silver;
Expand All @@ -27,7 +27,7 @@ QTabWidget > QTabBar::tab:!selected
background-color: #203040;
}

QTabWidget > QTabBar::tab:hover
QTabWidget > QTabBar::tab:hover
{
color:white;
background-color: #606060;
Expand Down
2 changes: 0 additions & 2 deletions res/tournaments/formatters/open.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@

</tbody>
</table>


1 change: 0 additions & 1 deletion res/tournaments/formatters/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ QListWidget::item::hover
{
background-color: #555555;
}

2 changes: 0 additions & 2 deletions res/tutorials/formatters/tutorials.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@
</tr>
</tbody>
</table>


2 changes: 1 addition & 1 deletion res/vaults/modvault/comment.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
</table>
<p width = 300>
{text}
</p>
</p>
2 changes: 1 addition & 1 deletion res/vaults/modvault/uimod.qthtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<p width="300">
{description}
</p>
</font>
</font>
3 changes: 2 additions & 1 deletion runtests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#! /usr/bin/env python3

import pytest
import sys

import pytest

if __name__ == '__main__':
sys.exit(pytest.main(sys.argv[1:]))
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import os
import sys
import site
import sys
from pathlib import Path

import PyQt5.uic
import sip
from pathlib import Path

sip.setapi('QString', 2)
sip.setapi('QVariant', 2)
sip.setapi('QStringList', 2)
sip.setapi('QList', 2)
sip.setapi('QProcess', 2)

import PyQt5.uic
if sys.platform == 'win32':
from cx_Freeze import setup, Executable
from cx_Freeze import Executable, setup
else:
from distutils.core import setup

Expand Down Expand Up @@ -169,5 +169,5 @@ def get_jsonschema_includes():
maintainer='Sheeo',
url='http://www.faforever.com',
license='GNU General Public License, Version 3',
**platform_options
**platform_options,
)
3 changes: 2 additions & 1 deletion src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

# According to PyQt5 docs we need to import QtWebEngineWidgets before we create
# QApplication
from PyQt5 import QtWebEngineWidgets, QtWidgets, uic
from PyQt5 import QtWebEngineWidgets # noqa: F401
from PyQt5 import QtWidgets, uic
from PyQt5.QtCore import Qt

import util
Expand Down
4 changes: 3 additions & 1 deletion src/api/stats_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from .ApiBase import ApiBase
import logging

from .ApiBase import ApiBase

logger = logging.getLogger(__name__)


Expand Down
5 changes: 5 additions & 0 deletions src/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
from chat.chatlineedit import ChatLineEdit
from chat.chatterlistview import ChatterListView

__all__ = (
"ChatLineEdit",
"ChatterListView",
)


class ChatMVC:
def __init__(
Expand Down
9 changes: 6 additions & 3 deletions src/chat/channel_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
from chat.channel_widget import ChannelWidget
from chat.chatter_menu import ChatterMenu
from chat.chatter_model import (
ChatterEventFilter, ChatterFormat,
ChatterItemDelegate, ChatterLayout,
ChatterLayoutElements, ChatterModel,
ChatterEventFilter,
ChatterFormat,
ChatterItemDelegate,
ChatterLayout,
ChatterLayoutElements,
ChatterModel,
ChatterSortFilterModel,
)
from downloadManager import DownloadRequest
Expand Down
4 changes: 4 additions & 0 deletions src/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

from ._clientwindow import ClientWindow

__all__ = (
"ThemeMenu",
)

logger = logging.getLogger(__name__)

instance = ClientWindow()
20 changes: 14 additions & 6 deletions src/client/_clientwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,33 @@
from chat.ircconnection import IrcConnection
from chat.language_channel_config import LanguageChannelConfig
from chat.line_restorer import ChatLineRestorer
from client.clientstate import ClientState
from client.aliasviewer import AliasSearchWindow, AliasWindow
from client.chat_config import ChatConfig
from client.clientstate import ClientState
from client.connection import (
ConnectionState, Dispatcher, LobbyInfo,
ServerConnection, ServerReconnecter,
ConnectionState,
Dispatcher,
LobbyInfo,
ServerConnection,
ServerReconnecter,
)
from client.gameannouncer import GameAnnouncer
from client.login import LoginWidget
from client.playercolors import PlayerColors
from client.theme_menu import ThemeMenu
from client.user import (
User, UserRelationController, UserRelationModel,
UserRelations, UserRelationTrackers,
User,
UserRelationController,
UserRelationModel,
UserRelations,
UserRelationTrackers,
)
from connectivity.ConnectivityDialog import ConnectivityDialog
from coop import CoopWidget
from downloadManager import (
MAP_PREVIEW_ROOT, AvatarDownloader, PreviewDownloader,
MAP_PREVIEW_ROOT,
AvatarDownloader,
PreviewDownloader,
)
from fa.factions import Factions
from fa.game_runner import GameRunner
Expand Down
2 changes: 1 addition & 1 deletion src/client/aliasviewer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from PyQt5 import QtWidgets
from PyQt5.QtCore import QDateTime, QTimer, Qt
from PyQt5.QtCore import QDateTime, Qt, QTimer

from api.player_api import PlayerApiConnector

Expand Down
4 changes: 4 additions & 0 deletions src/coop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
# For use by other modules
from ._coopwidget import CoopWidget

__all__ = (
"CoopWidget",
)

logger = logging.getLogger(__name__)
Loading

0 comments on commit e470b60

Please sign in to comment.