Skip to content

Instantly share code, notes, and snippets.

View prescod's full-sized avatar

Paul Prescod prescod

View GitHub Profile
================================================================================================================================== test session starts ==================================================================================================================================
platform darwin -- Python 3.7.4, pytest-5.2.0, py-1.8.0, pluggy-0.13.0
Django settings: config.settings.test (from ini file)
rootdir: /Users/pprescod/code/MetaCI, inifile: pytest.ini
plugins: django-3.5.1, factoryboy-2.0.3, tap-2.3, django-test-plus-1.3.1
collected 84 items
metaci/build/tests/test_models.py
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Users/pprescod/code/envs/metaci-py/lib/python3.7/site-packages/_pytest/main.py", line 191, in w
{
"name": "Python: CCI",
"type": "python",
"request": "launch",
"program": "/path/to/virtualenv/bin/cci",
"console": "integratedTerminal",
"pythonPath": "/path/to/virtualenv/bin/python",
"args": ["task", "run", "robot",
"-o", "suites", "./cumulusci/robotframework/tests/salesforce/api.robot"]
}
@prescod
prescod / Datepicker.js
Created March 26, 2019 04:09
Datepicker issues.
/* eslint-disable no-console, react/prop-types */
import React, { Component, useState } from 'react';
import logo from './logo.svg';
import './App.css';
import {IconSettings, Datepicker, Button} from '@salesforce/design-system-react';
class Example extends React.Component {
static displayName = 'DatepickerExample';
constructor(props) {
@prescod
prescod / Type signature
Created March 25, 2019 16:38
Type signature from Flow and React
{|+AbstractComponent: type AbstractComponent<-Config, +Instance = mixed> = React$AbstractComponent<Config, Instance>, +Children: {+count: (children: ChildrenArray<any>) => number, +forEach: <T>(children: ChildrenArray<T>, fn: (child: T, index: number) => mixed, thisArg?: mixed) => void, +map: <T, U>(children: ChildrenArray<T>, fn: (child: $NonMaybeType<T>, index: number) => U, thisArg?: mixed) => Array<$NonMaybeType<U>>, +only: <T>(children: ChildrenArray<T>) => $NonMaybeType<T>, +toArray: <T>(children: ChildrenArray<T>) => Array<$NonMaybeType<T>>}, +ChildrenArray: type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T, +Component: class React$Component<Props, State = void>, +ComponentType: type ComponentType<-P> = React$ComponentType<P>, +ConcurrentMode: ({children: ?React$Node}) => React$Node, +Config: type Config<Props, DefaultProps> = React$Config<Props, DefaultProps>, +Context: type Context<T> = React$Context<T>, +DOM: any, +Element: type Element<+C> = React$Element<C>, +ElementConfig: type Elemen
@prescod
prescod / MissingFilters.py
Created March 14, 2019 23:50
Weird filter attribute missing bug
import django_filters
class Xyzzy:
myfilter = django_filters.rest_framework.ChoiceFilter()
print(myfilter)
print(Xyzzy.myfilter)
class Xyzzy(django_filters.rest_framework.FilterSet):
myfilter = django_filters.rest_framework.ChoiceFilter()
{
"metadata": {
"name": "",
"signature": "sha256:0843cdf949229008d5c2362c84a6d66cb70da9a0f72079a98cbeb0efe7c7404b"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
fesfesfesfef
fesfejiofjeisf
xyzzy