Skip to content

Instantly share code, notes, and snippets.

View sambhav's full-sized avatar
🛠️
building cool stuff

Sambhav Kothari sambhav

🛠️
building cool stuff
View GitHub Profile
import os
from package.main import main
from package.utils import is_frozen, frozen_temp_path
# This is needed to find resources when using pyinstaller
if is_frozen:
basedir = frozen_temp_path
else:
basedir = os.path.dirname(os.path.abspath(__file__))
# These variables are set by pyinstaller if running from a frozen
# build. See http://pyinstaller.readthedocs.io/en/stable/runtime-information.html
is_frozen = getattr(sys, 'frozen', False)
frozen_temp_path = getattr(sys, '_MEIPASS', '')
# -*- mode: python -*-
import os
block_cipher = None
def get_resources():
data_files = []
for file_name in os.listdir('resources'):
data_files.append((os.path.join('resources', file_name), 'resources'))
return data_files
def get_resources():
data_files = []
for file_name in os.listdir('resources'):
data_files.append((os.path.join('resources', file_name), 'resources'))
return data_files
@sambhav
sambhav / basic.spec.py
Created February 16, 2018 13:19
Basic Pyinstaller Spec file
# -*- mode: python -*-
block_cipher = None
a = Analysis(['entry_point.py'],
pathex=['/path/to/package_dir'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
Number Commit
1 PICARD-851: Correctly update parent items on save
2 PICARD-855: Adds errorhandler for missing meta-data
3 PICARD-857: Add themeing support for GNOME-3 and remove deprecated checks
4 Remove quotes from theme name
5 Add support for nosetests
6 PICARD-857: Remove deprecated checks and add…
7 PICARD-546,287:
def test_initial(self):
self.defaults = self.widget.options
for option in options:
if option.section == 'setting':
if isinstance(option, config.BoolOption):
self.assertEqual(getattr(self.widget.ui, option.name).isChecked(), config.setting[option.name])
elif isinstance(option, config.TextOption):
self.assertEqual(getattr(self.widget.ui, option.name).value(), config.setting[option.name])
def test_value_change(self):
************* Module picard.album
54, 0: Too many instance attributes (18/7) (too-many-instance-attributes)
197, 4: Too many local variables (22/15) (too-many-locals)
256, 8: Too many nested blocks (6/5) (too-many-nested-blocks)
247,12: Redefinition of totalalbumtracks type from int to str (redefined-variable-type)
197, 4: Too many branches (23/12) (too-many-branches)
197, 4: Too many statements (67/50) (too-many-statements)
301, 4: Too many arguments (7/5) (too-many-arguments)
503, 4: Too many branches (14/12) (too-many-branches)
54, 0: Too many public methods (26/20) (too-many-public-methods)
# -*- coding: utf-8 -*-
PLUGIN_NAME = u"Cover Art Processors"
PLUGIN_AUTHOR = u"Sambhav Kothari"
PLUGIN_DESCRIPTION = ""
PLUGIN_VERSION = "0.1"
PLUGIN_API_VERSIONS = ["0.15"]
from picard.coverart.plugins import(
CoverartPluginFunction, FILE_ACTION, TAG_ACTION, DOWNLOAD_ACTION)
from picard import log