mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Fix many ESlint errors (#1265)
* Unvendor toml package * Fix many ESlint errors For mysterious reasons, these errors appear on my branch #1262 even though they are not related to changes there. The eslint config seems a bit unstable. Anyways this fixes them. * Put back Record * Fix typescript compilation * Fix lints * Try @iarna/toml instead * Fix import * Use @ltd/j-toml * Update test * Use toml-j0.4 * Some changes * Fix toml import * Try adding eslint gha job * Add forgotten checkout action * Force CI to run * Blah * Fix * Revert changes to github workflow * Fix lints * wget toml-j0.4 type definitions * Add toml-j types workaround to eslint workflow * Apply formatter * Use @hoodmane/toml-j0.4 * Import from @hoodmane/toml-j0.4
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access,
|
||||
@typescript-eslint/no-unsafe-call,
|
||||
@typescript-eslint/no-explicit-any,
|
||||
@typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
import type { AppConfig } from './pyconfig';
|
||||
import type { UserError } from './exceptions';
|
||||
import { getLogger } from './logger';
|
||||
@@ -20,7 +25,9 @@ export class Plugin {
|
||||
* This hook should **NOT** contain expensive operations, else it delays
|
||||
* the download of the python interpreter which is initiated later.
|
||||
*/
|
||||
configure(config: AppConfig) {}
|
||||
configure(_config: AppConfig) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** The preliminary initialization phase is complete and we are about to
|
||||
* download and launch the Python interpreter.
|
||||
@@ -32,14 +39,18 @@ export class Plugin {
|
||||
* This hook should **NOT** contain expensive operations, else it delays
|
||||
* the download of the python interpreter which is initiated later.
|
||||
*/
|
||||
beforeLaunch(config: AppConfig) {}
|
||||
beforeLaunch(_config: AppConfig) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** The Python interpreter has been launched, the virtualenv has been
|
||||
* installed and we are ready to execute user code.
|
||||
*
|
||||
* The <py-script> tags will be executed after this hook.
|
||||
*/
|
||||
afterSetup(interpreter: InterpreterClient) {}
|
||||
afterSetup(_interpreter: InterpreterClient) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** The source of a <py-script>> tag has been fetched, and we're about
|
||||
* to evaluate that source using the provided interpreter.
|
||||
@@ -48,7 +59,9 @@ export class Plugin {
|
||||
* @param options.src {string} The Python source code to be evaluated
|
||||
* @param options.pyScriptTag The <py-script> HTML tag that originated the evaluation
|
||||
*/
|
||||
beforePyScriptExec(options: { interpreter: InterpreterClient; src: string; pyScriptTag: PyScriptTag }) {}
|
||||
beforePyScriptExec(_options: { interpreter: InterpreterClient; src: string; pyScriptTag: PyScriptTag }) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** The Python in a <py-script> has just been evaluated, but control
|
||||
* has not been ceded back to the JavaScript event loop yet
|
||||
@@ -58,22 +71,28 @@ export class Plugin {
|
||||
* @param options.pyScriptTag The <py-script> HTML tag that originated the evaluation
|
||||
* @param options.result The returned result of evaluating the Python (if any)
|
||||
*/
|
||||
afterPyScriptExec(options: {
|
||||
afterPyScriptExec(_options: {
|
||||
interpreter: InterpreterClient;
|
||||
src: string;
|
||||
pyScriptTag: PyScriptTag;
|
||||
result: any;
|
||||
}) {}
|
||||
}) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** Startup complete. The interpreter is initialized and ready, user
|
||||
* scripts have been executed: the main initialization logic ends here and
|
||||
* the page is ready to accept user interactions.
|
||||
*/
|
||||
afterStartup(interpreter: InterpreterClient) {}
|
||||
afterStartup(_interpreter: InterpreterClient) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
/** Called when an UserError is raised
|
||||
*/
|
||||
onUserError(error: UserError) {}
|
||||
onUserError(_error: UserError) {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
|
||||
export class PluginManager {
|
||||
|
||||
Reference in New Issue
Block a user