This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Recursively looks through files and converts .ui and .qrc qt designer files to python code. | |
Just import this file at the top of your main module.(Dont forget to comment out before deploying) | |
""" | |
import os | |
from pathlib import Path | |
# convert interface | |
for path in Path('').rglob('*.ui'): | |
path_folder = path.parents[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert png files to one pdf, with transparency replaced with white colour | |
""" | |
import glob | |
from PIL import Image | |
IMG_FOLDER = "rez" | |
files = [] | |
for img in glob.glob(f"{IMG_FOLDER}/*.png"): | |
rgba = Image.open(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rule = require('../../../lib/rules/short-variable-name'); | |
const { RuleTester } = require('eslint'); | |
const ruleTester = new RuleTester({ | |
parserOptions: { ecmaVersion: 2020 } | |
}); | |
ruleTester.run('short-variable-name', rule, { | |
valid: [ | |
'const alpha = 20;', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
meta: { | |
type: "suggestion", | |
docs: { | |
description: "disallow generic variable names to promote descriptive naming", | |
category: "Stylistic Issues", | |
recommended: false, | |
url: "https://github.com/yourusername/eslint-plugin-yourpluginname/blob/main/docs/rules/no-generic-names.md" | |
}, | |
schema: [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
meta: { | |
type: "problem", | |
docs: { | |
description: "replace certain import paths with aliased paths", | |
category: "Stylistic Issues", | |
recommended: false, | |
}, | |
fixable: "code", | |
schema: [] |